From: Jason Molenda Date: Wed, 28 Jan 1998 00:17:53 +0000 (+0000) Subject: * configure.in (CONFIG_LDFLAGS): Only add -export-dynamic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b95e9a13ddec5ea161db5624a0ea7451d94237d;p=binutils-gdb.git * configure.in (CONFIG_LDFLAGS): Only add -export-dynamic when using GNU ld. A little longer patch than necessary due to some whitespace reformatting. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e50bfb8fe17..ea0e017aad7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 27 16:14:23 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * configure.in (CONFIG_LDFLAGS): Only add -export-dynamic + when using GNU ld. + Mon Jan 26 19:07:46 1998 Jason Molenda (crash@bugshack.cygnus.com) * config/alpha/tm-alphalinux.h (alpha_linux_sigtramp_offset): diff --git a/gdb/configure b/gdb/configure index ff655d9a527..07d99d32906 100755 --- a/gdb/configure +++ b/gdb/configure @@ -2358,36 +2358,36 @@ fi if test ${build} = ${host} -a ${host} = ${target} ; then - case ${host_os} in - hpux*) - echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 + case ${host_os} in + hpux*) + echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 echo "configure:2365: checking for HPUX/OSF thread support" >&5 - if test -f /usr/include/dce/cma_config.h ; then - if test "$GCC" = "yes" ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + if test -f /usr/include/dce/cma_config.h ; then + if test "$GCC" = "yes" ; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF #define HAVE_HPUX_THREAD_SUPPORT 1 EOF - CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" - else - echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 - fi - else - echo "$ac_t""no" 1>&6 - fi - ;; - solaris*) - echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 + CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" + else + echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 + fi + else + echo "$ac_t""no" 1>&6 + fi + ;; + solaris*) + echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 echo "configure:2383: checking for Solaris thread debugging library" >&5 - if test -f /usr/lib/libthread_db.so.1 ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + if test -f /usr/lib/libthread_db.so.1 ; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF #define HAVE_THREAD_DB_LIB 1 EOF - CONFIG_OBS="${CONFIG_OBS} sol-thread.o" - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 + CONFIG_OBS="${CONFIG_OBS} sol-thread.o" + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo "configure:2392: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then @@ -2434,15 +2434,43 @@ else echo "$ac_t""no" 1>&6 fi - if test "$GCC" = "yes" ; then - CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic" - fi - else - echo "$ac_t""no" 1>&6 - fi - ;; - esac - + 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 + echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 +echo "configure:2443: checking for the ld -export-dynamic flag" >&5 + LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + found=no +fi +rm -f conftest* + LDFLAGS=$hold_ldflags + echo "$ac_t""$found" 1>&6 + if test $found = yes; then + CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" + fi + fi + else + echo "$ac_t""no" 1>&6 + fi + ;; + esac + fi ENABLE_CFLAGS= @@ -2545,12 +2573,12 @@ fi # In the cygwin32 environment, we need some additional flags. echo $ac_n "checking for cygwin32""... $ac_c" 1>&6 -echo "configure:2549: checking for cygwin32" >&5 +echo "configure:2577: checking for cygwin32" >&5 if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:2607: checking for Tcl configuration" >&5 +echo "configure:2635: checking for Tcl configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2711,7 +2739,7 @@ if test "${with_tkconfig+set}" = set; then fi echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 -echo "configure:2715: checking for Tk configuration" >&5 +echo "configure:2743: checking for Tk configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2807,7 +2835,7 @@ fi no_tcl=true echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 -echo "configure:2811: checking for Tcl private headers. dir=${configdir}" >&5 +echo "configure:2839: checking for Tcl private headers. dir=${configdir}" >&5 # Check whether --with-tclinclude or --without-tclinclude was given. if test "${with_tclinclude+set}" = set; then withval="$with_tclinclude" @@ -2873,17 +2901,17 @@ fi if test x"${ac_cv_c_tclh}" = x ; then ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 -echo "configure:2877: checking for tclInt.h" >&5 +echo "configure:2905: checking for tclInt.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2943,7 +2971,7 @@ fi # no_tk=true echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 -echo "configure:2947: checking for Tk private headers" >&5 +echo "configure:2975: checking for Tk private headers" >&5 # Check whether --with-tkinclude or --without-tkinclude was given. if test "${with_tkinclude+set}" = set; then withval="$with_tkinclude" @@ -3009,17 +3037,17 @@ fi if test x"${ac_cv_c_tkh}" = x ; then ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tk.h""... $ac_c" 1>&6 -echo "configure:3013: checking for tk.h" >&5 +echo "configure:3041: checking for tk.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3065,7 +3093,7 @@ fi echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:3069: checking for Itcl private headers. srcdir=${srcdir}" >&5 +echo "configure:3097: checking for Itcl private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_itclh}" = x ; then for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do if test -f $i/src/itcl.h ; then @@ -3088,7 +3116,7 @@ fi echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:3092: checking for Tix private headers. srcdir=${srcdir}" >&5 +echo "configure:3120: checking for Tix private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_tixh}" = x ; then for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do if test -f $i/generic/tix.h ; then @@ -3314,7 +3342,7 @@ links="${links} nm.h" fi # start-sanitize-gdbtk echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3318: checking whether ln -s works" >&5 +echo "configure:3346: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3349,19 +3377,19 @@ fi echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 -echo "configure:3353: checking for Cygwin32 environment" >&5 +echo "configure:3381: checking for Cygwin32 environment" >&5 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin32=yes else @@ -3378,19 +3406,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 CYGWIN32= test "$am_cv_cygwin32" = yes && CYGWIN32=yes echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:3382: checking for Mingw32 environment" >&5 +echo "configure:3410: checking for Mingw32 environment" >&5 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -3409,7 +3437,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:3413: checking for executable suffix" >&5 +echo "configure:3441: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/gdb/configure.in b/gdb/configure.in index 2d41cd46d3b..5ad7b321263 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.