Merge pull request #185766 from stephank/fix/libcxxabi

libcxxabi: remove link with build libcxxabi

toonn 6a132cf2 23664c38

Changed files
+122 -11
pkgs
development
compilers
llvm
10
libcxxabi
11
libcxxabi
12
libcxxabi
13
libcxxabi
14
libcxxabi
5
libcxxabi
6
libcxxabi
7
libcxxabi
8
libcxxabi
9
libcxxabi
git
libcxxabi
+11 -1
pkgs/development/compilers/llvm/10/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/11/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/12/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/13/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+12 -1
pkgs/development/compilers/llvm/14/libcxxabi/default.nix
···
installPhase = if stdenv.isDarwin
then ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
+
make install
install -d 755 $out/include
install -m 644 ../include/*.h $out/include
+11 -1
pkgs/development/compilers/llvm/5/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/6/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/7/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/8/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/9/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';
+11 -1
pkgs/development/compilers/llvm/git/libcxxabi/default.nix
···
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
+
# Fix up the install name. Preserve the basename, just replace the path.
+
installName="$out/lib/$(basename $(otool -D $file | tail -n 1))"
+
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-
install_name_tool -id $out/$file $file
+
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+
# libcxxabi to sometimes link against a different version of itself.
+
# Here we simply make that second reference point to ourselves.
+
for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+
done
done
'';