-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
gcc9: don't run patchELF on statically linked binaries #89030
Conversation
This produces an error, at least when cross compiling statically for AArch32.
@@ -241,7 +241,7 @@ postInstall() { | |||
# More dependencies with the previous gcc or some libs (gccbug stores the build command line) | |||
rm -rf $out/bin/gccbug | |||
|
|||
if type "patchelf"; then | |||
if [ -n "${dontPatchELF}" ] && type "patchelf"; then |
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.
this should be -z
i think?
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.
Good point... that probably means that this isn't being set properly on the static builds! I'll look into it.
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.
I changed this locally and am re-running the build.
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.
Yeah, so adding assert staticCompiler;
to this expression fails, I guess that isn't acutally set in static.nix
. I could add an override for GCC, but there's the added complication of it being used in the stdenv, and being wrapped by wrapCC
. @matthewbauer do you have any advice on how I could cause this variable to be set when building pkgsStatic.gcc
?
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.
yeah i think that will work
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.
static.nix should only apply to the things in pkgsStatic, so I think it will actually be okay here
I'm unmotivated to figure this one out. Sorry! |
This produces an error, at least when cross compiling statically for AArch32.
Motivation for this change
Fixes #88956
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)