aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-06-23 10:12:14 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-06-23 10:12:14 +0000
commit38f6b338fd42e2c16c7e53eed49a80b10ac3692f (patch)
treede446835df7411654125aba28e19d74e2fd8392b /gdb/configure.ac
parent3fe10173509e4310745ecb1b2e77fb6e17d074ab (diff)
downloadgdb-38f6b338fd42e2c16c7e53eed49a80b10ac3692f.zip
gdb-38f6b338fd42e2c16c7e53eed49a80b10ac3692f.tar.gz
gdb-38f6b338fd42e2c16c7e53eed49a80b10ac3692f.tar.bz2
gdb/
* configure.ac: Always set RDYNAMIC at least as `-rdynamic'. * configure: Regenerate.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac83
1 files changed, 38 insertions, 45 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index aeac060..7ddb67f 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1453,54 +1453,47 @@ aix*)
;;
esac
+AC_MSG_CHECKING(for the dynamic export flag)
+dynamic_list=false
if test "${gdb_native}" = yes; 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.
- AC_MSG_CHECKING(for the dynamic export flag)
- 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"
- dynamic_list=false
- if test "${have_libpython}" = no; then
- AC_TRY_LINK([], [], [dynamic_list=true])
- else
- # Workaround http://bugs.python.org/issue4434 where static
- # libpythonX.Y.a would get its symbols required for
- # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
- # Problem does not happen for the recommended libpythonX.Y.so linkage.
- old_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PYTHON_CFLAGS"
- AC_RUN_IFELSE(
- AC_LANG_PROGRAM(
- [#include "]${have_libpython}[/Python.h"],
- [int err;
- Py_Initialize ();
- err = PyRun_SimpleString ("import itertools\n");
- Py_Finalize ();
- return err == 0 ? 0 : 1;]),
- [dynamic_list=true], [], [true])
- CFLAGS="$old_CFLAGS"
- fi
- if $dynamic_list;then
- found="-Wl,--dynamic-list"
- RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
- else
- RDYNAMIC="-rdynamic"
- LDFLAGS="$old_LDFLAGS $RDYNAMIC"
- AC_TRY_LINK([], [],
- [found="-rdynamic"],
- [found="no"
- # Error on its usage by .mh file.
- RDYNAMIC="no-rdynamic-available"])
- fi
- AC_SUBST(RDYNAMIC)
- LDFLAGS="$old_LDFLAGS"
- AC_MSG_RESULT($found)
+ # 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.
+ 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"
+ if test "${have_libpython}" = no; then
+ AC_TRY_LINK([], [], [dynamic_list=true])
+ else
+ # Workaround http://bugs.python.org/issue4434 where static
+ # libpythonX.Y.a would get its symbols required for
+ # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
+ # Problem does not happen for the recommended libpythonX.Y.so linkage.
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+ AC_RUN_IFELSE(
+ AC_LANG_PROGRAM(
+ [#include "]${have_libpython}[/Python.h"],
+ [int err;
+ Py_Initialize ();
+ err = PyRun_SimpleString ("import itertools\n");
+ Py_Finalize ();
+ return err == 0 ? 0 : 1;]),
+ [dynamic_list=true], [], [true])
+ CFLAGS="$old_CFLAGS"
fi
+ LDFLAGS="$old_LDFLAGS"
+fi
+if $dynamic_list; then
+ found="-Wl,--dynamic-list"
+ RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
+else
+ found="-rdynamic"
+ RDYNAMIC="-rdynamic"
fi
+AC_SUBST(RDYNAMIC)
+AC_MSG_RESULT($found)
dnl For certain native configurations, we need to check whether thread
dnl support can be built in or not.