Skip to content

Commit

Permalink
llvmPackages.bintools-unwrapped: add missing symlinks
Browse files Browse the repository at this point in the history
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: NixOS#210983
  • Loading branch information
alyssais committed Jan 17, 2023
1 parent f46ee73 commit 363cca9
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 27 deletions.
10 changes: 7 additions & 3 deletions pkgs/development/compilers/llvm/10/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
10 changes: 7 additions & 3 deletions pkgs/development/compilers/llvm/11/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
10 changes: 7 additions & 3 deletions pkgs/development/compilers/llvm/12/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
11 changes: 8 additions & 3 deletions pkgs/development/compilers/llvm/13/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
11 changes: 8 additions & 3 deletions pkgs/development/compilers/llvm/14/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
10 changes: 7 additions & 3 deletions pkgs/development/compilers/llvm/7/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
10 changes: 7 additions & 3 deletions pkgs/development/compilers/llvm/8/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
10 changes: 7 additions & 3 deletions pkgs/development/compilers/llvm/9/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
13 changes: 10 additions & 3 deletions pkgs/development/compilers/llvm/git/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''

0 comments on commit 363cca9

Please sign in to comment.