mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
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.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2010-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* configure.ac <"${have_libpython}" != no>: New workaround of
|
||||||
|
python#4434.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2010-06-08 Hui Zhu <teawater@gmail.com>
|
2010-06-08 Hui Zhu <teawater@gmail.com>
|
||||||
|
|
||||||
* record.c (record_wait): Move signal out of replay code.
|
* record.c (record_wait): Move signal out of replay code.
|
||||||
|
61
gdb/configure
vendored
61
gdb/configure
vendored
@ -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.
|
# Older GNU ld supports --export-dynamic but --dynamic-list it does not.
|
||||||
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
||||||
LDFLAGS="$LDFLAGS $RDYNAMIC"
|
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. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -14211,12 +14213,51 @@ main ()
|
|||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
found="-Wl,--dynamic-list"
|
dynamic_list=true
|
||||||
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
|
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
|
else
|
||||||
RDYNAMIC="-rdynamic"
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
/* end confdefs.h. */
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
#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. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -14231,14 +14272,12 @@ if ac_fn_c_try_link "$LINENO"; then :
|
|||||||
found="-rdynamic"
|
found="-rdynamic"
|
||||||
else
|
else
|
||||||
found="no"
|
found="no"
|
||||||
# Error on its usage by .mh file.
|
# Error on its usage by .mh file.
|
||||||
RDYNAMIC="no-rdynamic-available"
|
RDYNAMIC="no-rdynamic-available"
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
|
||||||
LDFLAGS="$old_LDFLAGS"
|
LDFLAGS="$old_LDFLAGS"
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
|
||||||
|
@ -1470,16 +1470,39 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
|
|||||||
# Older GNU ld supports --export-dynamic but --dynamic-list it does not.
|
# Older GNU ld supports --export-dynamic but --dynamic-list it does not.
|
||||||
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
||||||
LDFLAGS="$LDFLAGS $RDYNAMIC"
|
LDFLAGS="$LDFLAGS $RDYNAMIC"
|
||||||
AC_TRY_LINK([], [],
|
dynamic_list=false
|
||||||
[found="-Wl,--dynamic-list"
|
if test "${have_libpython}" = no; then
|
||||||
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],
|
AC_TRY_LINK([], [], [dynamic_list=true])
|
||||||
[RDYNAMIC="-rdynamic"
|
else
|
||||||
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
# Workaround http://bugs.python.org/issue4434 where static
|
||||||
AC_TRY_LINK([], [],
|
# libpythonX.Y.a would get its symbols required for
|
||||||
[found="-rdynamic"],
|
# pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
|
||||||
[found="no"
|
# Problem does not happen for the recommended libpythonX.Y.so linkage.
|
||||||
# Error on its usage by .mh file.
|
old_CFLAGS="$CFLAGS"
|
||||||
RDYNAMIC="no-rdynamic-available"])])
|
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)
|
AC_SUBST(RDYNAMIC)
|
||||||
LDFLAGS="$old_LDFLAGS"
|
LDFLAGS="$old_LDFLAGS"
|
||||||
AC_MSG_RESULT($found)
|
AC_MSG_RESULT($found)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2010-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* gdb.python/python.exp (pythonX.Y/lib-dynload/*.so): New.
|
||||||
|
|
||||||
2010-06-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2010-06-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
Test PR 10640.
|
Test PR 10640.
|
||||||
|
@ -80,3 +80,6 @@ gdb_test "source $srcdir/$subdir/source2.py" "yes"
|
|||||||
|
|
||||||
gdb_test "python print gdb.current_objfile()" "None"
|
gdb_test "python print gdb.current_objfile()" "None"
|
||||||
gdb_test "python print gdb.objfiles()" "\\\[\\\]"
|
gdb_test "python print gdb.objfiles()" "\\\[\\\]"
|
||||||
|
|
||||||
|
# Test http://bugs.python.org/issue4434 workaround in configure.ac
|
||||||
|
gdb_test "python import itertools; print 'IMPOR'+'TED'" "IMPORTED" "pythonX.Y/lib-dynload/*.so"
|
||||||
|
Reference in New Issue
Block a user