* configure: Regenerated.
* Makefile (INTERNAL_LDFLAGS): New.
(gdbserver, gdbreplay): Use it.
+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.
# 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
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
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
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
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
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