From e682dd84cff5d2420fcc0a40508557477f6cc9d3 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 22 Jul 2022 00:46:35 +0300 Subject: [PATCH] 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' --- pkgs/build-support/bintools-wrapper/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index b5adae03df2d..119d3edfdc2e 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -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}