Initial implementation of vc4 cross-compile#72657
Conversation
|
https://gist.github.com/c9e89ceaadba96f1969bc8eeab8ba532
|
pkgs/development/misc/vc4/newlib.nix
Outdated
There was a problem hiding this comment.
Perhaps we should merge the "mainline", "msp430", and "vc4" newlib's into a shared derivation to make this a little easier to maintain (presumably you only want one "newlib" at a time). I hadn't realized how many forks of newlib existed! Not necessary for this PR though.
There was a problem hiding this comment.
GCC forks are hard to maintain. Not sure how to handle this though
There was a problem hiding this comment.
This also looks like it's actually GCC6, not GCC8. This would be a good opportunity figure out if we can make it possible to select Compilers when cross compiling. Right now we just do this:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/cross/default.nix#L54-L62
Adding some option for what GCC version you need would be useful.
/cc @Ericson2314
There was a problem hiding this comment.
Yeah let's the diff to be gcc 6 too. We can figure out compiler selection and stuff later. The source replacement isn't fun, but it's the least invasive option. We can bring this stuff up for the platform support RFCs.
|
i can confirm that building with the gcc6 exprs still works, and the generated |
|
Awesome! |
This is supported in this GCC fork. [1] It has been packaged in Nixpkgs since 2019. [2] Their change to `config.sub` [3] is similar, but also includes a `vc4` -> `vc4-unknown-elf` shorthand; I don't see any reasons to add any new legacy 1-component short-hands, so I just skipped that part. [1]: https://github.com/itszor/vc4-toolchain [2]: NixOS/nixpkgs#72657 [3]: itszor/gcc-vc4@91278af * config.sub (vc4-*): Recognize. * testsuite/config-sub.data (vc4-unknown-none-elf): New entries.
This is supported in this GCC fork. [1] It has been packaged in Nixpkgs since 2019. [2] Their change to `config.sub` [3] is similar, but also includes a `vc4` -> `vc4-unknown-elf` shorthand; I don't see any reasons to add any new legacy 1-component short-hands, so I just skipped that part. [1]: https://github.com/itszor/vc4-toolchain [2]: NixOS/nixpkgs#72657 [3]: itszor/gcc-vc4@91278af * config.sub (vc4-*): Recognize. * testsuite/config-sub.data (vc4-unknown-none-elf): New entries.
This is supported in this GCC fork. [1] It has been packaged in Nixpkgs since 2019. [2] Their change to `config.sub` [3] is similar, but also includes a `vc4` -> `vc4-unknown-elf` shorthand; I don't see any reasons to add any new legacy 1-component short-hands, so I just skipped that part. [1]: https://github.com/itszor/vc4-toolchain [2]: NixOS/nixpkgs#72657 [3]: itszor/gcc-vc4@91278af * config.sub (vc4-*): Recognize. * testsuite/config-sub.data (vc4-unknown-none-elf): New entries.
This is supported in this GCC fork. [1] It has been packaged in Nixpkgs since 2019. [2] Their change to `config.sub` [3] is similar, but also includes a `vc4` -> `vc4-unknown-elf` shorthand; I don't see any reasons to add any new legacy 1-component short-hands, so I just skipped that part. [1]: https://github.com/itszor/vc4-toolchain [2]: NixOS/nixpkgs#72657 [3]: itszor/gcc-vc4@91278af * config.sub (vc4-*): Recognize. * testsuite/config-sub.data (vc4-unknown-none-elf): New entries.
This is supported in this GCC fork. [1] It has been packaged in Nixpkgs since 2019. [2] Their change to `config.sub` [3] is similar, but also includes a `vc4` -> `vc4-unknown-elf` shorthand; I don't see any reasons to add any new legacy 1-component short-hands, so I just skipped that part. [1]: https://github.com/itszor/vc4-toolchain [2]: NixOS/nixpkgs#72657 [3]: itszor/gcc-vc4@91278af * config.sub (vc4-*): Recognize. * testsuite/config-sub.data (vc4-unknown-none-elf): New entry. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Motivation for this change
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"./result/bin/)nix path-info -Sbefore and after)Notify maintainers
cc @