mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
Merge pull request #185766 from stephank/fix/libcxxabi
libcxxabi: remove link with build libcxxabi
This commit is contained in:
commit
6a132cf2f3
@ -42,11 +42,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -46,11 +46,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -44,11 +44,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -41,11 +41,21 @@ stdenv.mkDerivation rec {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -52,12 +52,23 @@ stdenv.mkDerivation rec {
|
||||
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
|
||||
|
@ -27,11 +27,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -27,11 +27,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -46,11 +46,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -42,11 +42,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -42,11 +42,21 @@ stdenv.mkDerivation {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -70,11 +70,21 @@ stdenv.mkDerivation rec {
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user