llvmPackages.bintools-unwrapped: add missing symlinks

We were missing symlinks for some programs e.g. strings, which caused
e.g. pkgsLLVM.x264 to fail to build.

Here, I have filled in all the symlinks that LLVM would create if
built with the LLVM_INSTALL_BINUTILS_SYMLINKS option.  Where an
existing symlink's target has changed, it's to avoid a double
indirection e.g. strip -> llvm-strip -> llvm-objcopy has because just
strip -> llvm-objcopy.

There's also the related problem that we are creating a as -> llvm-as
symlink, which doesn't make sense, but I'll remove that in a
subsequent commit so that if it somehow breaks something it's easy to
revert just that change.

Fixes: https://github.com/NixOS/nixpkgs/pull/210983
This commit is contained in:
Alyssa Ross 2023-01-16 22:28:04 +00:00
parent ea35ef77d3
commit 3d1e039332
9 changed files with 68 additions and 27 deletions

View File

@ -15,15 +15,19 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,19 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,19 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,20 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-rc $out/bin/${prefix}windres
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,20 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-rc $out/bin/${prefix}windres
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,19 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,19 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,19 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -15,15 +15,22 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-debuginfod $out/bin/${prefix}debuginfod
ln -s ${llvm}/bin/llvm-debuginfod-find $out/bin/${prefix}debuginfod-find
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-rc $out/bin/${prefix}windres
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''