From dd7af0746398caad45ce0c78316c501029e257ac Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 2 Jul 2011 00:31:35 +0000 Subject: Correct last commit. --- gold/configure | 1 + gold/configure.ac | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'gold') diff --git a/gold/configure b/gold/configure index 66c9d82..b882223 100755 --- a/gold/configure +++ b/gold/configure @@ -6132,6 +6132,7 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LDFLAGS=$LDFLAGS_hold fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_lib_static" >&5 $as_echo "$gold_cv_lib_static" >&6; } diff --git a/gold/configure.ac b/gold/configure.ac index 47120b4..949c8c3 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -265,11 +265,12 @@ dnl Test for whether static linking is supported. Some systems do not dnl install static libraries. This only affects the set of tests that dnl we run. AC_CACHE_CHECK([whether static linking works], [gold_cv_lib_static], -LDFLAGS_hold=$LDFLAGS +[LDFLAGS_hold=$LDFLAGS LDFLAGS="$LDFLAGS -static" -[AC_LINK_IFELSE([ +AC_LINK_IFELSE([ AC_LANG_PROGRAM([[void f() { }]])], -[gold_cv_lib_static=yes], [gold_cv_lib_static=no])]) +[gold_cv_lib_static=yes], [gold_cv_lib_static=no]) +LDFLAGS=$LDFLAGS_hold]) AM_CONDITIONAL(HAVE_STATIC, test "$gold_cv_lib_static" = "yes") dnl Some architectures do not support taking pointers of functions -- cgit v1.1