ghc/ghc-suse-as-needed.patch

48 lines
1.5 KiB
Diff

diff -Nur ghc-7.4.2/aclocal.m4 ghc-7.4.2-fix-rpath/aclocal.m4
--- ghc-7.4.2/aclocal.m4 2012-06-06 19:10:25.000000000 +0200
+++ ghc-7.4.2-fix-rpath/aclocal.m4 2012-07-27 21:01:32.000000000 +0200
@@ -437,6 +437,13 @@
$4="$$4 $LdReduceMemoryOverheads"
fi
+ # Do not add RUNPATH tag whe linking. See trac #7062
+ if test -n "$LdDisableNewDtags"
+ then
+ $3="$$3 -Wl,$LdDisableNewDtags"
+ $4="$$4 $LdDisableNewDtags"
+ fi
+
rm -f conftest.c conftest.o
AC_MSG_RESULT([done])
])
@@ -833,6 +840,17 @@
])# FP_PROG_LD_ReduceMemoryOverheads
+# FP_PROG_LD_DisableNewDtags
+# ------------
+# Sets the output variable LdDisableNewDtags to
+# --disable-new-dtags if ld supports this flag.
+# Otherwise the variable's value is empty.
+AC_DEFUN([FP_PROG_LD_DisableNewDtags],
+[
+FP_PROG_LD_FLAG([--disable-new-dtags],[LdDisableNewDtags])
+])# FP_PROG_LD_DisableNewDtags
+
+
# FP_PROG_LD_BUILD_ID
# ------------
diff -Nur ghc-7.4.2/configure.ac ghc-7.4.2-fix-rpath/configure.ac
--- ghc-7.4.2/configure.ac 2012-06-06 19:10:25.000000000 +0200
+++ ghc-7.4.2-fix-rpath/configure.ac 2012-07-27 20:57:16.000000000 +0200
@@ -426,6 +426,8 @@
FP_PROG_LD_HashSize31
FP_PROG_LD_ReduceMemoryOverheads
+dnl Check if RUNPATH can be disabled (#7062)
+FP_PROG_LD_DisableNewDtags
FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS],[IGNORE_LINKER_LD_FLAGS],[CPPFLAGS])
FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_GCC_LINKER_OPTS_STAGE0],[CONF_LD_LINKER_OPTS_STAGE0],[CONF_CPP_OPTS_STAGE0])