diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-06-08 16:41:45 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-06-08 16:41:45 +0000 |
commit | 3bebe2f205d1c30429898da05047b656e6796f6a (patch) | |
tree | 52f7a41bc1daebece577a1496a111359cb90f102 /gdb/configure | |
parent | 7da73d69b0c630cf527454e23431747010746393 (diff) | |
download | gdb-3bebe2f205d1c30429898da05047b656e6796f6a.zip gdb-3bebe2f205d1c30429898da05047b656e6796f6a.tar.gz gdb-3bebe2f205d1c30429898da05047b656e6796f6a.tar.bz2 |
gdb/
* configure.ac <"${have_libpython}" != no>: New workaround of
python#4434.
* configure: Regenerate.
gdb/testsuite/
* gdb.python/python.exp (pythonX.Y/lib-dynload/*.so): New.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 61 |
1 files changed, 50 insertions, 11 deletions
diff --git a/gdb/configure b/gdb/configure index bae0b5b..f3cb23a 100755 --- a/gdb/configure +++ b/gdb/configure @@ -14199,7 +14199,9 @@ $as_echo_n "checking for the dynamic export flag... " >&6; } # 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 + dynamic_list=false + if test "${have_libpython}" = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -14211,12 +14213,51 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - found="-Wl,--dynamic-list" - RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' + dynamic_list=true +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + 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" + if test "$cross_compiling" = yes; then : + true else - RDYNAMIC="-rdynamic" - LDFLAGS="$old_LDFLAGS $RDYNAMIC" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "${have_libpython}/Python.h" +int +main () +{ +int err; + Py_Initialize (); + err = PyRun_SimpleString ("import itertools\n"); + Py_Finalize (); + return err == 0 ? 0 : 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + dynamic_list=true +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + 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" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -14231,14 +14272,12 @@ 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 + # 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 LDFLAGS="$old_LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |