Merge pull request #169907 from trofi/fix-binutils-unwrapped-all-targets

binutils-unwrapped-all-targets: fix libctf breakage
This commit is contained in:
Sergei Trofimovich 2022-04-30 15:48:43 +00:00 committed by GitHub
commit c807c8c681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ in
, enableGold ? execFormatIsELF stdenv.targetPlatform , enableGold ? execFormatIsELF stdenv.targetPlatform
, enableShared ? !stdenv.hostPlatform.isStatic , enableShared ? !stdenv.hostPlatform.isStatic
# WARN: Enabling all targets increases output size to a multiple. # WARN: Enabling all targets increases output size to a multiple.
, withAllTargets ? false, libbfd, libopcodes , withAllTargets ? false
}: }:
# WARN: configure silently disables ld.gold if it's unsupported, so we need to # WARN: configure silently disables ld.gold if it's unsupported, so we need to
@ -183,11 +183,9 @@ stdenv.mkDerivation {
# Fails # Fails
doCheck = false; doCheck = false;
postFixup = lib.optionalString (enableShared && withAllTargets) '' # Remove on next bump. It's a vestige of past conditional. Stays here to avoid
rm "$out"/lib/lib{bfd,opcodes}-${version}.so # mass rebuild.
ln -s '${lib.getLib libbfd}/lib/libbfd-${version}.so' "$out/lib/" postFixup = "";
ln -s '${lib.getLib libopcodes}/lib/libopcodes-${version}.so' "$out/lib/"
'';
# INFO: Otherwise it fails with: # INFO: Otherwise it fails with:
# `./sanity.sh: line 36: $out/bin/size: not found` # `./sanity.sh: line 36: $out/bin/size: not found`