diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rwxr-xr-x | gdb/configure | 14 | ||||
-rw-r--r-- | gdb/configure.ac | 14 |
3 files changed, 33 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e8d4ed1..05e5c40 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2016-05-03 Pedro Alves <palves@redhat.com> + * configure.ac (PYTHON_LIBS): Sed away "-Xlinker -export-dynamic". + * configure: Regenerate. + +2016-05-03 Pedro Alves <palves@redhat.com> + * configure.ac (checking for the dynamic export flag): Add $PYTHON_CPPFLAGS to CPPFLAGS. * configure: Regenerate. diff --git a/gdb/configure b/gdb/configure index bc6761f..7ade907 100755 --- a/gdb/configure +++ b/gdb/configure @@ -9413,6 +9413,14 @@ else CONFIG_SRCS="$CONFIG_SRCS python/python.c" fi +# Work around Python http://bugs.python.org/issue10112. See also +# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has +# no effect. Note that the only test after this that uses Python is +# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be +# run without -export-dynamic too. +PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` + + if test "${have_libpython}" != no; then @@ -13705,6 +13713,12 @@ rm -f core conftest.err conftest.$ac_objext \ # 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. + + # Note the workaround for Python + # http://bugs.python.org/issue10112 earlier has removed + # -export-dynamic from PYTHON_LIBS. That's exactly what we want + # here too, as otherwise it'd make this -Wl,--dynamic-list test + # always pass. old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PYTHON_CFLAGS" old_LIBS="$LIBS" diff --git a/gdb/configure.ac b/gdb/configure.ac index d7b2e8a..d1930f9 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1024,6 +1024,14 @@ else CONFIG_OBS="$CONFIG_OBS python.o" CONFIG_SRCS="$CONFIG_SRCS python/python.c" fi + +# Work around Python http://bugs.python.org/issue10112. See also +# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has +# no effect. Note that the only test after this that uses Python is +# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be +# run without -export-dynamic too. +PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` + AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_CPPFLAGS) AC_SUBST(PYTHON_LIBS) @@ -1718,6 +1726,12 @@ if test "${gdb_native}" = yes; then # 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. + + # Note the workaround for Python + # http://bugs.python.org/issue10112 earlier has removed + # -export-dynamic from PYTHON_LIBS. That's exactly what we want + # here too, as otherwise it'd make this -Wl,--dynamic-list test + # always pass. old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PYTHON_CFLAGS" old_LIBS="$LIBS" |