ar, lipo, otool (etc.) should also be linked with -rpath for libLTO

This commit is contained in:
Thomas Pöchtrager 2015-02-23 21:15:19 +01:00
parent 736d20921d
commit 49bc9aa407
2 changed files with 32 additions and 0 deletions

View File

@ -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"

View 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,