Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: -rdynamic where available



Michael Banck discovered that $host on the Hurd (i686-unknown-gnu0.3)
was not matching the pattern below, thus EXTRA_LDFLAGS was not getting
set to -rdynamic, thus zsh_SYS_DYNAMIC_EXECSYMS was failing, leading to
libzsh getting built.

This patch is based on
http://sourceware.org/ml/gdb-patches/2004-10/msg00294.html

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.65
diff -u -r1.65 configure.ac
--- configure.ac	12 Jul 2007 03:09:13 -0000	1.65
+++ configure.ac	25 Jul 2007 14:45:45 -0000
@@ -2325,7 +2290,6 @@
   esac
   case "$host" in
     *-hpux*)  EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-E}" ;;
-    *-freebsd[3-9]*|*-kfreebsd*|*-linux*|gnu*) EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-rdynamic}" ;;
     *openbsd*)
        if test x$zsh_cv_sys_elf = xyes; then
 	 EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-E}"
@@ -2351,6 +2315,13 @@
       esac
     ;;
   esac
+AC_CACHE_CHECK(if we can use -rdynamic, zsh_cv_rdynamic_available,
+old_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS -rdynamic"
+AC_TRY_LINK([], [], [zsh_cv_rdynamic_available=yes
+EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-rdynamic}"],
+[zsh_cvs_rdynamic_available=no])
+LDFLAGS="$old_LDFLAGS")
   AC_CACHE_CHECK(if your dlsym() needs a leading underscore,
    zsh_cv_func_dlsym_needs_underscore,
    [echo failed >conftestval && cat >conftest.c <<EOM



Messages sorted by: Reverse Date, Date, Thread, Author