* configure.in: Test for -rdynamic.

* configure: Regenerated.
	* Makefile (INTERNAL_LDFLAGS): New.
	(gdbserver, gdbreplay): Use it.
This commit is contained in:
Daniel Jacobowitz 2004-10-16 16:18:54 +00:00
parent bc5f45f8ff
commit f6de3c42a3
4 changed files with 39 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2004-10-16 Daniel Jacobowitz <dan@debian.org>
* configure.in: Test for -rdynamic.
* configure: Regenerated.
* Makefile (INTERNAL_LDFLAGS): New.
(gdbserver, gdbreplay): Use it.
2004-09-02 Andrew Cagney <cagney@gnu.org>
* Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.

View File

@ -103,6 +103,7 @@ INTERNAL_CFLAGS = $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
LDFLAGS = @LDFLAGS@
INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
# Perhaps should come from parent Makefile
VERSION = gdbserver-4.12.3
@ -171,12 +172,12 @@ clean-info:
gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
rm -f gdbserver
${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
${CC-LD} $(GLOBAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver $(OBS) \
$(GDBSERVER_LIBS) $(XM_CLIBS)
gdbreplay: gdbreplay.o
rm -f gdbreplay
${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbreplay gdbreplay.o \
${CC-LD} $(GLOBAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay gdbreplay.o \
$(XM_CLIBS)
# Put the proper machine-specific files first, so M-. on a machine

View File

@ -1582,6 +1582,28 @@ rm -f conftest*
else
srv_libs="$srv_cv_thread_db"
fi
old_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -rdynamic"
cat > conftest.$ac_ext <<EOF
#line 1589 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
RDYNAMIC=-rdynamic
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
RDYNAMIC=
fi
rm -f conftest*
LDFLAGS="$old_LDFLAGS"
fi
if test "$srv_linux_thread_db" = "yes"; then
@ -1749,6 +1771,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CPP@%$CPP%g
s%@RDYNAMIC@%$RDYNAMIC%g
s%@GDBSERVER_DEPFILES@%$GDBSERVER_DEPFILES%g
s%@GDBSERVER_LIBS@%$GDBSERVER_LIBS%g
s%@USE_THREAD_DB@%$USE_THREAD_DB%g

View File

@ -1,5 +1,5 @@
dnl Autoconf configure script for GDB server.
dnl Copyright 2000, 2002 Free Software Foundation, Inc.
dnl Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
dnl
@ -114,6 +114,11 @@ if test "$srv_linux_thread_db" = "yes"; then
else
srv_libs="$srv_cv_thread_db"
fi
old_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -rdynamic"
AC_TRY_LINK([], [], [RDYNAMIC=-rdynamic], [RDYNAMIC=])
AC_SUBST(RDYNAMIC)
LDFLAGS="$old_LDFLAGS"
fi
if test "$srv_linux_thread_db" = "yes"; then