* configure.ac: Always set RDYNAMIC at least as `-rdynamic'.
	* configure: Regenerate.
This commit is contained in:
Jan Kratochvil
2010-06-23 10:12:14 +00:00
parent 3fe1017350
commit 38f6b338fd
3 changed files with 79 additions and 103 deletions

View File

@ -1,3 +1,8 @@
2010-06-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure.ac: Always set RDYNAMIC at least as `-rdynamic'.
* configure: Regenerate.
2010-06-22 Hui Zhu <teawater@gmail.com> 2010-06-22 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_record_lea_modrm): Change warning to query. * i386-tdep.c (i386_record_lea_modrm): Change warning to query.

94
gdb/configure vendored
View File

@ -14186,20 +14186,19 @@ $as_echo "$gdb_cv_bigtoc" >&6; }
;; ;;
esac esac
if test "${gdb_native}" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
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; } $as_echo_n "checking for the dynamic export flag... " >&6; }
old_LDFLAGS="$LDFLAGS" dynamic_list=false
# Older GNU ld supports --export-dynamic but --dynamic-list it does not. if test "${gdb_native}" = yes; then
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" # The dynamically loaded libthread_db needs access to symbols in the gdb
LDFLAGS="$LDFLAGS $RDYNAMIC" # executable. Older GNU ld supports --export-dynamic but --dynamic-list
dynamic_list=false # may not be supported there.
if test "${have_libpython}" = no; then old_LDFLAGS="$LDFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext # 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
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
int int
@ -14215,14 +14214,14 @@ if ac_fn_c_try_link "$LINENO"; then :
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
else else
# Workaround http://bugs.python.org/issue4434 where static # Workaround http://bugs.python.org/issue4434 where static
# libpythonX.Y.a would get its symbols required for # libpythonX.Y.a would get its symbols required for
# pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
# Problem does not happen for the recommended libpythonX.Y.so linkage. # Problem does not happen for the recommended libpythonX.Y.so linkage.
old_CFLAGS="$CFLAGS" old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PYTHON_CFLAGS" CFLAGS="$CFLAGS $PYTHON_CFLAGS"
if test "$cross_compiling" = yes; then : if test "$cross_compiling" = yes; then :
true true
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@ -14232,10 +14231,10 @@ int
main () main ()
{ {
int err; int err;
Py_Initialize (); Py_Initialize ();
err = PyRun_SimpleString ("import itertools\n"); err = PyRun_SimpleString ("import itertools\n");
Py_Finalize (); Py_Finalize ();
return err == 0 ? 0 : 1; return err == 0 ? 0 : 1;
; ;
return 0; return 0;
} }
@ -14247,41 +14246,20 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext conftest.$ac_objext conftest.beam conftest.$ac_ext
fi fi
CFLAGS="$old_CFLAGS" 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
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
LDFLAGS="$old_LDFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
$as_echo "$found" >&6; }
fi fi
LDFLAGS="$old_LDFLAGS"
fi fi
if $dynamic_list; then
found="-Wl,--dynamic-list"
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
else
found="-rdynamic"
RDYNAMIC="-rdynamic"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
$as_echo "$found" >&6; }
if test ${build} = ${host} -a ${host} = ${target} ; then if test ${build} = ${host} -a ${host} = ${target} ; then

View File

@ -1453,54 +1453,47 @@ aix*)
;; ;;
esac esac
AC_MSG_CHECKING(for the dynamic export flag)
dynamic_list=false
if test "${gdb_native}" = yes; then if test "${gdb_native}" = yes; then
if test "$GCC" = "yes" ; then # The dynamically loaded libthread_db needs access to symbols in the gdb
# The dynamically loaded libthread_db needs access to symbols in the gdb # executable. Older GNU ld supports --export-dynamic but --dynamic-list
# executable. Older GNU ld supports --export-dynamic but --dynamic-list # may not be supported there.
# may not be supported there. old_LDFLAGS="$LDFLAGS"
AC_MSG_CHECKING(for the dynamic export flag) # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
old_LDFLAGS="$LDFLAGS" RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
# Older GNU ld supports --export-dynamic but --dynamic-list it does not. LDFLAGS="$LDFLAGS $RDYNAMIC"
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" if test "${have_libpython}" = no; then
LDFLAGS="$LDFLAGS $RDYNAMIC" AC_TRY_LINK([], [], [dynamic_list=true])
dynamic_list=false else
if test "${have_libpython}" = no; then # Workaround http://bugs.python.org/issue4434 where static
AC_TRY_LINK([], [], [dynamic_list=true]) # libpythonX.Y.a would get its symbols required for
else # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
# Workaround http://bugs.python.org/issue4434 where static # Problem does not happen for the recommended libpythonX.Y.so linkage.
# libpythonX.Y.a would get its symbols required for old_CFLAGS="$CFLAGS"
# pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. CFLAGS="$CFLAGS $PYTHON_CFLAGS"
# Problem does not happen for the recommended libpythonX.Y.so linkage. AC_RUN_IFELSE(
old_CFLAGS="$CFLAGS" AC_LANG_PROGRAM(
CFLAGS="$CFLAGS $PYTHON_CFLAGS" [#include "]${have_libpython}[/Python.h"],
AC_RUN_IFELSE( [int err;
AC_LANG_PROGRAM( Py_Initialize ();
[#include "]${have_libpython}[/Python.h"], err = PyRun_SimpleString ("import itertools\n");
[int err; Py_Finalize ();
Py_Initialize (); return err == 0 ? 0 : 1;]),
err = PyRun_SimpleString ("import itertools\n"); [dynamic_list=true], [], [true])
Py_Finalize (); CFLAGS="$old_CFLAGS"
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)
fi fi
LDFLAGS="$old_LDFLAGS"
fi 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 For certain native configurations, we need to check whether thread
dnl support can be built in or not. dnl support can be built in or not.