Merge pull request #182385 from Artturin/bintoolswrapper1

bintools-wrapper: symlink unsymlinked binaries from -unwrapped
This commit is contained in:
Artturi 2022-07-23 08:07:43 +03:00 committed by GitHub
commit 981d9c0926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,11 +164,13 @@ stdenv.mkDerivation {
wrap ld-solaris ${./ld-solaris-wrapper.sh} wrap ld-solaris ${./ld-solaris-wrapper.sh}
'') '')
# Create a symlink to as (the assembler). # Create symlinks for rest of the binaries.
+ '' + ''
if [ -e $ldPath/${targetPrefix}as ]; then for binary in objdump objcopy size strings as nm gprof dwp c++filt addr2line ranlib readelf elfedit; do
ln -s $ldPath/${targetPrefix}as $out/bin/${targetPrefix}as if [ -e $ldPath/${targetPrefix}''${binary} ]; then
fi ln -s $ldPath/${targetPrefix}''${binary} $out/bin/${targetPrefix}''${binary}
fi
done
'' + (if !useMacosReexportHack then '' '' + (if !useMacosReexportHack then ''
wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld} wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld}