[PATCH] Use libtool -export-dynamic flag for portability

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Wed Feb 24 01:15:07 PST 2010

From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

The linker flag required for exporting symbols in executables varies
by platform.  libtool handles this with a single -export-dynamic
flag (not to be confused with the similarly-named ELF linker flag)
which tells it to use the correct platform-specific flag at link time.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
 configure.ac |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5e6669d..eae9a41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1439,17 +1439,9 @@ UTILS_SYS_LIBS="${SYS_LIBS}"
 # The Xorg binary needs to export symbols so that they can be used from modules
-# Some platforms require extra flags to do this.   gcc should set these flags
-# when -rdynamic is passed to it, other compilers/linkers may need to be added
-# here.
-if test "x$GCC" = "xyes"; then
-       LD_EXPORT_SYMBOLS_FLAG="-rdynamic"
-case $host_os in
-       openbsd*)
-       LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic"
-       ;;
+# Some platforms require extra flags to do this.   libtool should set the
+# necessary flags for each platform when -export-dynamic is passed to it.
 dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so

More information about the xorg-devel mailing list