Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add riscv-gnu-toolchain #65343

Closed
wants to merge 1 commit into from
Closed

Add riscv-gnu-toolchain #65343

wants to merge 1 commit into from

Conversation

jaykru
Copy link
Contributor

@jaykru jaykru commented Jul 24, 2019

Motivation for this change

Adds a derivation for riscv-gnu-toolchain (https://github.com/riscv/riscv-gnu-toolchain) which is a GNU toolchain for RISC-V, including GCC. The derivation currently builds a Linux multilib (riscv64 and riscv32) Newlib cross-compilation toolchain oriented toward embedded systems applications, though one could add options to the derivation to build Linux/glibc and single-arch toolchains.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • [N/A] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [N/A] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ThibautMarty
Copy link
Member

What is the difference with e.g pkgsCross.riscv64.buildPackages.gcc, pkgsCross.riscv64.buildPackages.binutils, newlib or newlibCross?

@jaykru
Copy link
Contributor Author

jaykru commented Jul 24, 2019

What is the difference with e.g pkgsCross.riscv64.buildPackages.gcc, pkgsCross.riscv64.buildPackages.binutils, newlib or newlibCross?

Not sure. Could you point to some reading about those?

Unfortunately it seems that this derivation produces a broken ld anyway, so I will close for now and open a new PR if I manage to get it working and determine it would offer something different from the packages you mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants