bintools-wrapper: symlink unsymlinked binaries from -unwrapped

this shouldn't change any binary available in the default build environment
because bintools-unwrapped is already in path ( idk where it comes from but i know because objcopy is in path but not in the wrapper )

this just makes all the binaries available under 'bintools' instead of
having to use 'bintools-unwrapped'

reduces confusion because now 'objcopy' and others will be in 'bintools'
This commit is contained in:
Artturin 2022-07-22 00:46:35 +03:00
parent 5a01941e5f
commit e682dd84cf

View File

@ -164,11 +164,13 @@ stdenv.mkDerivation {
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
ln -s $ldPath/${targetPrefix}as $out/bin/${targetPrefix}as
fi
for binary in objdump objcopy size strings as nm gprof dwp c++filt addr2line ranlib readelf elfedit; do
if [ -e $ldPath/${targetPrefix}''${binary} ]; then
ln -s $ldPath/${targetPrefix}''${binary} $out/bin/${targetPrefix}''${binary}
fi
done
'' + (if !useMacosReexportHack then ''
wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld}