libc++abi: Don't set dylib install name to /usr/lib
This caused users of libc++abi to use the system libc++abi.
This commit is contained in:
parent
66dedaa6ee
commit
1117201a97
17
pkgs/development/libraries/libc++abi/darwin.patch
Normal file
17
pkgs/development/libraries/libc++abi/darwin.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -ru -x '*~' libcxxabi-orig/lib/buildit libcxxabi/lib/buildit
|
||||
--- libcxxabi-orig/lib/buildit 2014-09-18 16:54:14.000000000 +0200
|
||||
+++ libcxxabi/lib/buildit 2014-09-24 13:22:27.000000000 +0200
|
||||
@@ -51,12 +51,8 @@
|
||||
-dynamiclib -nodefaultlibs \
|
||||
-current_version ${RC_ProjectSourceVersion} \
|
||||
-compatibility_version 1 \
|
||||
- -install_name /usr/lib/libc++abi.dylib \
|
||||
+ -install_name $out/lib/libc++abi.dylib \
|
||||
-lSystem"
|
||||
- if [ -f "${SDKROOT}/usr/local/lib/libCrashReporterClient.a" ]
|
||||
- then
|
||||
- LDSHARED_FLAGS+=" -lCrashReporterClient"
|
||||
- fi
|
||||
;;
|
||||
*-*-mingw*)
|
||||
# FIXME: removing libgcc and libsupc++ dependencies means porting libcxxrt and LLVM/compiler-rt
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, libcxx, libunwind, coreutils, gnused }:
|
||||
{ lib, stdenv, fetchurl, libcxx, libunwind, coreutils, gnused }:
|
||||
|
||||
let rev = "199626"; in
|
||||
|
||||
@ -10,6 +10,8 @@ stdenv.mkDerivation {
|
||||
sha256 = "09wr6qwgmdzbmgfkdzfhph9giy0zd6fp3s017fcfy4g0prjn5s4c";
|
||||
};
|
||||
|
||||
patches = [ ./no-stdc++.patch ./darwin.patch ];
|
||||
|
||||
NIX_CFLAGS_LINK = "-L${libunwind}/lib -lunwind";
|
||||
|
||||
buildInputs = [ coreutils ];
|
||||
@ -17,7 +19,7 @@ stdenv.mkDerivation {
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxx.src}
|
||||
export NIX_CFLAGS_COMPILE="-I${libunwind}/include -I$PWD/include -I$(readlink -f libcxx-*)/include"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
'';
|
||||
|
||||
@ -35,8 +37,6 @@ stdenv.mkDerivation {
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
patchPhase = "${gnused}/bin/sed -e s,-lstdc++,, -i lib/buildit";
|
||||
|
||||
buildPhase = "(cd lib; ./buildit)";
|
||||
|
||||
meta = {
|
||||
|
12
pkgs/development/libraries/libc++abi/no-stdc++.patch
Normal file
12
pkgs/development/libraries/libc++abi/no-stdc++.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ru -x '*~' libcxxabi-orig/lib/buildit libcxxabi/lib/buildit
|
||||
--- libcxxabi-orig/lib/buildit 2014-09-18 16:54:14.000000000 +0200
|
||||
+++ libcxxabi/lib/buildit 2014-09-24 13:22:27.000000000 +0200
|
||||
@@ -70,7 +66,7 @@
|
||||
SOEXT=so
|
||||
LDSHARED_FLAGS="-o libc++abi.so.1.0 \
|
||||
-shared -nodefaultlibs -Wl,-soname,libc++abi.so.1 \
|
||||
- -lpthread -lrt -lc -lstdc++"
|
||||
+ -lpthread -lrt -lc"
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user