binutils: apply debian's patch if isMips64n64 #167489
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Upstream binutils is missing sensible defaults for a few flags (notably linker personality) when cross-compiling to
mips64el-*-*abi64
.Most of the time this isn't an issue because packages that invoke the linker directly detect the flags from gcc's behavior (for example, libtool does this) and gcc has good code for detecting the right defaults. However some do not; notably nix, itself lacks this.
Presumably Debian is working on upstreaming this, and has more clout than we do. I propose we carry their patch in the meantime. The patch is conditioned on
stdenv.targetPlatform.isMips64n64
in order to avoid mass-rebuilds.This plus #161162 can build
nix_2_4
natively and can cross-buildpkgsCross.mips64el-linux-gnuabi64.pkgsStatic.nix_2_4
from x86_64.Things done
sandbox = true
set innix.conf
? (See Nix manual)./result/bin/
)