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
gnu-efi: Use their crosscompilation support correctly #72694
Conversation
IIUC, previously, the cross-compilation support was done in a somewhat hacky way and was, basically, special-cased for ARM. Now we use the cross-compilation support intergrated into their own build system. Test: * nix-build --arg crossSystem '(import <nixpkgs/lib>).systems.examples.musl64' '<nixpkgs>' -A gnu-efi
(FTR it is also possible to set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
"OBJCOPY=${stdenv.cc.targetPrefix}objcopy" | ||
] ++ stdenv.lib.optional stdenv.isAarch32 "ARCH=arm" | ||
++ stdenv.lib.optional stdenv.isAarch64 "ARCH=aarch64"; | ||
"HOSTCC=${buildPackages.stdenv.cc.targetPrefix}cc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We mostly assume that the "build" machine's compiler (HOSTCC to gnu-efi) is just "cc", but perhaps we shouldn't in some more complicated instances. /cc @Ericson2314
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewbauer Yeah I think it's just more consistent to never assume, anything. Also, I am tempted to do less concrete arch processing and do build-cc
cc
target-cc
, once we can get rid of the infix salt :D.
Dropping |
See #72819 |
IIUC, previously, the cross-compilation support was done in a somewhat
hacky way and was, basically, special-cased for ARM.
Now we use the cross-compilation support intergrated into their own
build system.
Test:
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @