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 | 5 ++++- configure.ac | 9 --------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index fa1b0c4..15abb8c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,7 +45,10 @@ AM_CFLAGS = $(CWARNFLAGS) # xdm_CFLAGS = $(XDM_CFLAGS) -xdm_LDADD = $(XDM_LIBS) $(XDM_LDFLAGS) +# 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_SOURCES = \ auth.c \ diff --git a/configure.ac b/configure.ac index 129e2fb..880af25 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" @@ -421,7 +413,6 @@ AC_SEARCH_LIBS(crypt, crypt) AC_SUBST(XDM_CFLAGS) AC_SUBST(XDM_LIBS) -AC_SUBST(XDM_LDFLAGS) # # xdmshell -- 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
