diff options
author | Jason Molenda <jmolenda@apple.com> | 1998-01-28 00:17:53 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1998-01-28 00:17:53 +0000 |
commit | 4b95e9a13ddec5ea161db5624a0ea7451d94237d (patch) | |
tree | 5549b0190ef8ed46e3b34137388da75debedf10e /gdb/configure.in | |
parent | 53a560f95a552b1b2bb017db9614b6bade78dafb (diff) | |
download | gdb-4b95e9a13ddec5ea161db5624a0ea7451d94237d.zip gdb-4b95e9a13ddec5ea161db5624a0ea7451d94237d.tar.gz gdb-4b95e9a13ddec5ea161db5624a0ea7451d94237d.tar.bz2 |
* configure.in (CONFIG_LDFLAGS): Only add -export-dynamic
when using GNU ld.
A little longer patch than necessary due to some whitespace reformatting.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r-- | gdb/configure.in | 72 |
1 files changed, 41 insertions, 31 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index 2d41cd4..5ad7b32 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -202,37 +202,47 @@ dnl Note that we only want this if we are both native (host == target), and dnl not doing a canadian cross build (build == host). if test ${build} = ${host} -a ${host} = ${target} ; then - case ${host_os} in - hpux*) - AC_MSG_CHECKING(for HPUX/OSF thread support) - if test -f /usr/include/dce/cma_config.h ; then - if test "$GCC" = "yes" ; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_HPUX_THREAD_SUPPORT) - CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" - else - AC_MSG_RESULT(no (suppressed because you are not using GCC)) - fi - else - AC_MSG_RESULT(no) - fi - ;; - solaris*) - AC_MSG_CHECKING(for Solaris thread debugging library) - if test -f /usr/lib/libthread_db.so.1 ; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_THREAD_DB_LIB) - CONFIG_OBS="${CONFIG_OBS} sol-thread.o" - AC_CHECK_LIB(dl, dlopen) - if test "$GCC" = "yes" ; then - CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic" - fi - else - AC_MSG_RESULT(no) - fi - ;; - esac - AC_SUBST(CONFIG_LDFLAGS) + case ${host_os} in + hpux*) + AC_MSG_CHECKING(for HPUX/OSF thread support) + if test -f /usr/include/dce/cma_config.h ; then + if test "$GCC" = "yes" ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_HPUX_THREAD_SUPPORT) + CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" + else + AC_MSG_RESULT(no (suppressed because you are not using GCC)) + fi + else + AC_MSG_RESULT(no) + fi + ;; + solaris*) + AC_MSG_CHECKING(for Solaris thread debugging library) + if test -f /usr/lib/libthread_db.so.1 ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_THREAD_DB_LIB) + CONFIG_OBS="${CONFIG_OBS} sol-thread.o" + AC_CHECK_LIB(dl, dlopen) + if test "$GCC" = "yes" ; then + # The GNU linker requires the -export-dynamic option to make + # all symbols visible in the dynamic symbol table. + hold_ldflags=$LDFLAGS + AC_MSG_CHECKING(for the ld -export-dynamic flag) + LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" + AC_TRY_LINK(, [int i;], found=yes, found=no) + LDFLAGS=$hold_ldflags + AC_MSG_RESULT($found) + if test $found = yes; then + CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" + fi + fi + else + AC_MSG_RESULT(no) + fi + ;; + esac + AC_SUBST(CONFIG_LDFLAGS) fi dnl Handle optional features that can be enabled. |