This replaces -rdynamic which is a GNU/Linux only solution.

"If symbols from your executable are needed to satisfy unresolved
references in a library you want to dlopen you will have to use
the flag -export-dynamic. You should use -export-dynamic while
linking the executable that calls dlopen."

It is used by the xserver, in Xdmx for example.

Signed-off-by: Gaetan Nadon <[email protected]>
---
 Makefile.am  |    3 +++
 configure.ac |    8 --------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index fa1b0c4..ae9c061 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,6 +45,9 @@ AM_CFLAGS = $(CWARNFLAGS)
 #
 
 xdm_CFLAGS = $(XDM_CFLAGS)
+# The xdm binary needs to export symbols so that they can be used from
+# libXdmGreet.so loaded through a dlopen call from session.c
+xdm_LDFLAGS =  -export-dynamic
 xdm_LDADD = $(XDM_LIBS) $(XDM_LDFLAGS)
 
 xdm_SOURCES =  \
diff --git a/configure.ac b/configure.ac
index 129e2fb..c075859 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,14 +382,6 @@ PKG_CHECK_MODULES(AUTH, xau)
 # Greeter
 #
 
-# The xdm binary needs to export symbols so that they can be used from
-# libXdmGreet.so.  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
-if test "x$GCC" = "xyes"; then
-       XDM_LDFLAGS="$XDM_LDFLAGS -rdynamic"
-fi
-
 PKG_CHECK_MODULES(XDMGREET, xt x11 xext)
 
 GREETERLIB="${XDMLIBDIR}/libXdmGreet.so"
-- 
1.6.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to