Blob Blame Raw
From 38961cabe0fce9f44b504e0ffc4e1919bffe48ea Mon Sep 17 00:00:00 2001
From: Jan Wielemaker <J.Wielemaker@cs.vu.nl>
Date: Thu, 10 Feb 2011 15:30:32 +0100
Subject: [PATCH] FIXED: Bug#470: Using -export-dynamic is not a valid gcc flag.  Causes
 real problems in gcc 4.6 and later.  Petr Pisar.

---
 src/configure.in |   30 ++++--------------------------
 1 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/src/configure.in b/src/configure.in
index dfb7a67..d8e8ccf 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -385,37 +385,15 @@ fi
 if test "$PLSHARED" = "yes"; then
 
 dnl Some versions of (g)cc need to export the symbols from the main program
-dnl using -export-dynamic or (older versions) -rdynamic.  See whether
-dnl this gcc understands this flag.
+dnl using -rdynamic.  See whether this gcc understands this flag.
 
 case "$ARCH" in
   *darwin*)
-	exportdynamic=done
+	rdynamic=done
 	;;
 esac
 
-if test "$exportdynamic" != "done"; then
-AC_MSG_CHECKING(whether LDFLAGS need -export-dynamic)
-  old_ldflags="$LDFLAGS"
-  LDFLAGS="-export-dynamic $LDFLAGS"
-  AC_TRY_RUN(
-main()
-{ exit(0);
-},
-     if grep 'unrecognized option `-export-dynamic'"'" config.log >/dev/null; then
-       AC_MSG_RESULT(no)
-       LDFLAGS="$old_ldflags"
-     else
-       AC_MSG_RESULT(yes)
-       exportdynamic=done
-     fi,
-     AC_MSG_RESULT(no)
-     LDFLAGS="$old_ldflags",
-     AC_MSG_RESULT(no)
-     LDFLAGS="$old_ldflags")
-fi	dnl test for -exportdynamic
-
-if test "$exportdynamic" != "done"; then
+if test "$rdynamic" != "done"; then
 AC_MSG_CHECKING("whether LDFLAGS need -rdynamic")
   old_ldflags="$LDFLAGS"
   LDFLAGS="-rdynamic $LDFLAGS"
@@ -433,7 +411,7 @@ main()
      LDFLAGS="$old_ldflags",
      AC_MSG_RESULT(no)
      LDFLAGS="$old_ldflags")
-fi	dnl test for -rdynamic
+fi
 
 dnl Some specific OS stuff
 
-- 
1.7.4