From c829a8884b52b57f9e4adea3078016ed338ecfa9 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 27 Sep 2009 06:49:33 +0000 Subject: [PATCH] Fix library dependencies for -Wl,--as-needed. gcc/: PR bootstrap/40928 * configure.ac: Use $LIBS for '-ldl', not $LDFLAGS. * configure: Regenerate. libjava/: PR libgcj/38298 * Makefile.am (libgcj_tools_la_LIBADD): Add '-lm'. * Makefile.in: Regenerate. From-SVN: r152215 --- gcc/ChangeLog | 6 ++++++ gcc/configure | 2 +- gcc/configure.ac | 2 +- libjava/ChangeLog | 6 ++++++ libjava/Makefile.am | 2 +- libjava/Makefile.in | 2 +- 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0bbadeb5573..ccad7ca4432 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-09-27 Ralf Wildenhues + + PR bootstrap/40928 + * configure.ac: Use $LIBS for '-ldl', not $LDFLAGS. + * configure: Regenerate. + 2009-09-26 Kaveh R. Ghazi * doc/install.texi: Update minimum MPC version to 0.7. diff --git a/gcc/configure b/gcc/configure index ced17cdbb14..dbd10a5ef2b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -24952,7 +24952,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi # Check -ldl - LDFLAGS="$LDFLAGS -ldl" + LIBS="$LIBS -ldl" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -ldl" >&5 $as_echo_n "checking for -ldl... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/gcc/configure.ac b/gcc/configure.ac index 3f0ff7dea59..96b3b5db56e 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4228,7 +4228,7 @@ if test x"$enable_plugin" = x"yes"; then fi # Check -ldl - LDFLAGS="$LDFLAGS -ldl" + LIBS="$LIBS -ldl" AC_MSG_CHECKING([for -ldl]) AC_TRY_LINK( [#include ], diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e8ad3b347ce..0a6c90260d5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2009-09-27 Ralf Wildenhues + + PR libgcj/38298 + * Makefile.am (libgcj_tools_la_LIBADD): Add '-lm'. + * Makefile.in: Regenerate. + 2009-09-22 Dave Korn * configure.host (enable_libgcj_sublibs_default): New variable, diff --git a/libjava/Makefile.am b/libjava/Makefile.am index e923fa30c5e..ad4fca2b6a8 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -496,7 +496,7 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) -no-undefined -bindir $(bindir) -libgcj_tools_la_LIBADD = libgcj.la +libgcj_tools_la_LIBADD = libgcj.la -lm libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec if BUILD_SUBLIBS libgcj_tools_la_DEPENDENCIES += libgcj-noncore.la diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 83c4c606975..8c093738e34 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -1187,7 +1187,7 @@ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) -no-undefined -bindir $(bindir) -libgcj_tools_la_LIBADD = libgcj.la +libgcj_tools_la_LIBADD = libgcj.la -lm libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec $(am__append_22) libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS) libjvm_la_SOURCES = jni-libjvm.cc