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
binutils: Fix cross, again #33186
binutils: Fix cross, again #33186
Conversation
Binutils is patched so we don't rely on `--rpath-link`.
This ensures we by-default cross-compile to the intended platform.
@@ -164,6 +164,20 @@ stdenv.mkDerivation { | |||
set +u | |||
''; | |||
|
|||
emulation = let |
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 I will move this to the lib, with some of the other misc per-tool stuff / provide a way for {build,host,target}Platform
(e.g. via crossConfig
) to override it. That, however, is a non-hash-breaking change so no reason to rush it now.
@@ -53,6 +53,14 @@ stdenv.mkDerivation rec { | |||
# elf32-littlearm-vxworks in favor of the first. | |||
# https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766 | |||
./disambiguate-arm-targets.patch | |||
|
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 or @bgamari should email upstream cause the default behavior is insane.
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 have reported this at https://sourceware.org/bugzilla/show_bug.cgi?id=22458, with no response so far. (Said so in #30484 (comment).)
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.
Ah, you meant always-search-rpath.patch
below.
Motivation for this change
It's been broken since I made it multi-arch, but this fixes it. Making this a separate PR to lessen the diff, and in case anything breaks later.
Things done
Tested exhaustively in #26805.
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)