diff --git a/build.sh b/build.sh index e0dfd70..77df2a7 100755 --- a/build.sh +++ b/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" diff --git a/patches/cctools-ld64-rpath.patch b/patches/cctools-ld64-rpath.patch new file mode 100644 index 0000000..5929f41 --- /dev/null +++ b/patches/cctools-ld64-rpath.patch @@ -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,