libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 1/9] Conditionalize -static-libcxa test


From: Zachary T Welch
Subject: [Libunwind-devel] [PATCH 1/9] Conditionalize -static-libcxa test
Date: Mon, 8 Nov 2010 17:16:33 -0800

The -static-libcxa test only applies for the Intel compiler, but the
check could pass for some versions of GCC.  It would be accepted with
a warning in the past, but it produces an error with GCC 4.6.

Signed-off-by: Zachary T Welch <address@hidden>
---
 configure.in |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/configure.in b/configure.in
index 7dd991c..0a93209 100644
--- a/configure.in
+++ b/configure.in
@@ -209,16 +209,6 @@ AC_MSG_RESULT([$enable_conservative_checks])
 
 LIBUNWIND___THREAD
 
-AC_MSG_CHECKING([if linker supports -static-libcxa])
-save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS -static-libcxa"
-AC_TRY_LINK([], [], [have_static_libcxa=yes], [have_static_libcxa=no])
-LDFLAGS="$save_LDFLAGS"
-if test "x$have_static_libcxa" = xyes; then
-  LDFLAGS_STATIC_LIBCXA="-XCClinker -static-libcxa"
-fi
-AC_MSG_RESULT([$have_static_libcxa])
-
 AC_MSG_CHECKING([for Intel compiler])
 AC_TRY_COMPILE([], [#ifndef __INTEL_COMPILER
 #error choke me
@@ -230,6 +220,18 @@ if test x$GCC = xyes -a x$intel_compiler != xyes; then
 fi
 AC_MSG_RESULT([$intel_compiler])
 
+if test x$intel_compiler = xyes; then
+  AC_MSG_CHECKING([if linker supports -static-libcxa])
+  save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LDFLAGS -static-libcxa"
+  AC_TRY_LINK([], [], [have_static_libcxa=yes], [have_static_libcxa=no])
+  LDFLAGS="$save_LDFLAGS"
+  if test "x$have_static_libcxa" = xyes; then
+    LDFLAGS_STATIC_LIBCXA="-XCClinker -static-libcxa"
+  fi
+  AC_MSG_RESULT([$have_static_libcxa])
+fi
+
 CCASFLAGS="${CCASFLAGS} ${CPPFLAGS}"
 
 arch="$target_arch"
-- 
1.7.2.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]