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
ghc: Misc cross fixes #47626
ghc: Misc cross fixes #47626
Conversation
We really need to abstract to avoid these copy-paste errors.
Not sure why this one doesn't
Other patches are also needed for a working build, but that doesn't mean these patches are any less necessary.
@@ -239,4 +239,8 @@ stdenv.mkDerivation rec { | |||
inherit (ghc.meta) license platforms; | |||
}; | |||
|
|||
} | |||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt { | |||
dontStrip = true; |
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.
Sounds okay for now, but eventually we should try to track down what is happening here. It must be a bug in binutils & patchelf, right? In theory android should just be using standard ELFs.
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 think it's simpler/stupider than that: a problem from using prebuilt tools. I think if we used the prebuilt tools for gccCrossStageStatic
and then built our own stage final GCC it would work fine.
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.
Ok makes sense. It's surprising that the prebuilt tools would not work though? At least they shouldn't break stuff. Since this is probably needed everywhere, is there a way to set this globally for all prebuilt android?
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.
Well I take it back; I actually do remember a strip bug with the wrong strip mangling the binary. My newer setup hook included a largely untested provision to do one or the other strip, but if they
There is a bunch of dontStrip
for cross scattered about that i don't think has been systematically investigated.
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.
No idea what the don't patchelf side of it about. I could try removing that across the board after reunification. :)
Motivation for this change
Things needed for consistency, and for mobile builds.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)