* configure.in: Test for -rdynamic.
authorDaniel Jacobowitz <drow@false.org>
Sat, 16 Oct 2004 16:18:54 +0000 (16:18 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sat, 16 Oct 2004 16:18:54 +0000 (16:18 +0000)
* configure: Regenerated.
* Makefile (INTERNAL_LDFLAGS): New.
(gdbserver, gdbreplay): Use it.

gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in
gdb/gdbserver/configure
gdb/gdbserver/configure.in

index 0095e5f87e001ec716b5f342ad70f02913137c5f..ea3b0829d88b03b39acd35210757422c1f3fd0d8 100644 (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.
index a5c1f95531be82db897c14e65f8faee5af47280f..712376157ffb0cfdfbcb710a6819972a7437e6ac 100644 (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
index 62d3785f4ab78f7d7d9ff7b85eb9deff3cfa52e9..0bcefd6bc44ad0118129c89ad76c60a3f9310938 100755 (executable)
@@ -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
index a5a34dfbda0208c7a54c260bc6c40e43ad24724a..027699a6063536dad158d976d904b0a023e3bfc1 100644 (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