1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-09-27 17:09:29 +02:00

Conditionalize -static-libcxa test

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 <zwelch@codesourcery.com>
This commit is contained in:
Zachary T Welch 2010-11-08 17:16:33 -08:00 committed by Arun Sharma
parent 651e9bb4fd
commit 717239a936

View file

@ -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"