mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
ar, lipo, otool (etc.) should also be linked with -rpath for libLTO
This commit is contained in:
parent
736d20921d
commit
49bc9aa407
1
build.sh
1
build.sh
@ -181,6 +181,7 @@ patch -p0 < $PATCH_DIR/cctools-ld64-2.patch
|
||||
patch -p1 < $PATCH_DIR/cctools-ld64-strnlen.patch
|
||||
patch -p0 < $PATCH_DIR/cctools-ld64-llvm-3.7.patch
|
||||
patch -p0 < $PATCH_DIR/cctools-ld64-abs-warning.patch
|
||||
patch -p0 < $PATCH_DIR/cctools-ld64-rpath.patch
|
||||
echo ""
|
||||
CONFFLAGS="--prefix=$TARGET_DIR --target=x86_64-apple-$TARGET"
|
||||
[ -n "$DISABLE_LTO_SUPPORT" ] && CONFFLAGS+=" --enable-lto=no"
|
||||
|
31
patches/cctools-ld64-rpath.patch
Normal file
31
patches/cctools-ld64-rpath.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- configure
|
||||
+++ configure
|
||||
@@ -16789,7 +16789,7 @@
|
||||
LTO_LIB="-L${LLVM_LIB_DIR} -lLTO"
|
||||
if test "x$rpathlink" = "xyes"; then
|
||||
LTO_RPATH="-Wl,-rpath,$LLVM_LIB_DIR,--enable-new-dtags"
|
||||
- LTO_LIB="$LTO_RPATH $LTO_LIB"
|
||||
+ LTO_LIB="$LTO_LIB"
|
||||
fi
|
||||
LTO_DEF=-DLTO_SUPPORT
|
||||
# DO NOT include the LLVM include dir directly,
|
||||
@@ -16813,6 +16813,8 @@
|
||||
|
||||
|
||||
|
||||
+LDFLAGS="$LDFLAGS $LTO_RPATH"
|
||||
+
|
||||
### Check endianness ###
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
|
||||
--- m4/llvm.m4
|
||||
+++ m4/llvm.m4
|
||||
@@ -27,7 +27,7 @@
|
||||
[ LTO_LIB="-L${LLVM_LIB_DIR} -lLTO"
|
||||
if test "x$rpathlink" = "xyes"; then
|
||||
LTO_RPATH="-Wl,-rpath,$LLVM_LIB_DIR,--enable-new-dtags"
|
||||
- LTO_LIB="$LTO_RPATH $LTO_LIB"
|
||||
+ LTO_LIB="$LTO_LIB"
|
||||
fi
|
||||
LTO_DEF=-DLTO_SUPPORT
|
||||
# DO NOT include the LLVM include dir directly,
|
Loading…
Reference in New Issue
Block a user