Skip to content

Commit e682dd8

Browse files
committed
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'
1 parent 5a01941 commit e682dd8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

pkgs/build-support/bintools-wrapper/default.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,13 @@ stdenv.mkDerivation {
164164
wrap ld-solaris ${./ld-solaris-wrapper.sh}
165165
'')
166166

167-
# Create a symlink to as (the assembler).
167+
# Create symlinks for rest of the binaries.
168168
+ ''
169-
if [ -e $ldPath/${targetPrefix}as ]; then
170-
ln -s $ldPath/${targetPrefix}as $out/bin/${targetPrefix}as
171-
fi
169+
for binary in objdump objcopy size strings as nm gprof dwp c++filt addr2line ranlib readelf elfedit; do
170+
if [ -e $ldPath/${targetPrefix}''${binary} ]; then
171+
ln -s $ldPath/${targetPrefix}''${binary} $out/bin/${targetPrefix}''${binary}
172+
fi
173+
done
172174
173175
'' + (if !useMacosReexportHack then ''
174176
wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld}

0 commit comments

Comments
 (0)