diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-28 18:50:35 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-28 18:50:35 +0000 |
commit | f6528abd6444820594f6d2147b9aa7f312539411 (patch) | |
tree | 890cfc2dc2f2c27bc2db842ded441f000c7aed42 /gdb/configure | |
parent | 096554ab8e066968273156f38761b44b57cea151 (diff) | |
download | gdb-f6528abd6444820594f6d2147b9aa7f312539411.zip gdb-f6528abd6444820594f6d2147b9aa7f312539411.tar.gz gdb-f6528abd6444820594f6d2147b9aa7f312539411.tar.bz2 |
gdb/
* Makefile.in (RDYNAMIC): New.
(SFILES): Add proc-service.list.
* config/alpha/alpha-linux.mh (NAT_CDEPS): New.
(LOADLIBES): Replace -rdynamic by $(RDYNAMIC).
* config/arm/linux.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/s390/s390.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* configure.ac: New RDYNAMIC on native host and GCC.
(solaris*): Replace -Wl,-export-dynamic by $RDYNAMIC.
* configure: Regenerate.
* proc-service.list: New.
gdb/gdbserver/
* Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
(CDEPS): New.
* configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
-Wl,--dynamic-list.
* configure: Regenerate.
* proc-service.list: New.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 90 |
1 files changed, 58 insertions, 32 deletions
diff --git a/gdb/configure b/gdb/configure index 1ac7d4b..5380293 100755 --- a/gdb/configure +++ b/gdb/configure @@ -657,6 +657,7 @@ SYSTEM_GDBINIT TARGET_SYSTEM_ROOT_DEFINE TARGET_SYSTEM_ROOT CONFIG_LDFLAGS +RDYNAMIC ALLOCA PYTHON_CFLAGS python_prog_path @@ -14171,6 +14172,62 @@ esac if test ${build} = ${host} -a ${host} = ${target} ; then + if test "$GCC" = "yes" ; then + # The dynamically loaded libthread_db needs access to symbols in the gdb + # executable. Older GNU ld supports --export-dynamic but --dynamic-list + # may not be supported there. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 +$as_echo_n "checking for the dynamic export flag... " >&6; } + old_LDFLAGS="$LDFLAGS" + # Older GNU ld supports --export-dynamic but --dynamic-list it does not. + RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" + LDFLAGS="$LDFLAGS $RDYNAMIC" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + found="-Wl,--dynamic-list" + RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' +else + RDYNAMIC="-rdynamic" + LDFLAGS="$old_LDFLAGS $RDYNAMIC" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + found="-rdynamic" +else + found="no" + # Error on its usage by .mh file. + RDYNAMIC="no-rdynamic-available" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LDFLAGS="$old_LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 +$as_echo "$found" >&6; } + fi + case ${host_os} in hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5 @@ -14253,38 +14310,7 @@ _ACEOF fi - 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5 -$as_echo_n "checking for the ld -export-dynamic flag... " >&6; } - LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -int i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - found=yes -else - found=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 -$as_echo "$found" >&6; } - if test $found = yes; then - CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" - fi - fi + CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" # Sun randomly tweaked the prototypes in <proc_service.h> # at one point. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |