This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[v3, build] Restrict -Wa,-nH use to Solaris (PR libstdc++/55594)
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 07 Jan 2013 17:39:52 +0100
- Subject: [v3, build] Restrict -Wa,-nH use to Solaris (PR libstdc++/55594)
As reported in the PR, the AIX assembler also accepts the -nH option,
but with completely different semantics. To avoid this, the current
patch restricts checking the option to Solaris targets.
Bootstrapped without regressions on i386-pc-solaris2.10 with Sun as
(-Wa,-nH is added), x86_64-unknown-linux-gnu (test no longer performed),
tested on AIX by David.
Ok for mainline?
Rainer
2013-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libstdc++/55594
* acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Restrict test to
Solaris targets.
* configure: Regenerate.
# HG changeset patch
# Parent 432f2ce7493ce21ac73d8d1a10d32695da22d58a
Restrict -Wa,-nH use to Solaris (PR libstdc++/55594)
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -178,17 +178,23 @@ dnl
AC_DEFUN([GLIBCXX_CHECK_ASSEMBLER_HWCAP], [
test -z "$HWCAP_FLAGS" && HWCAP_FLAGS=''
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wa,-nH"
-
- AC_MSG_CHECKING([for as that supports -Wa,-nH])
- AC_TRY_COMPILE([], [return 0;], [ac_hwcap_flags=yes],[ac_hwcap_flags=no])
- if test "$ac_hwcap_flags" = "yes"; then
- HWCAP_FLAGS="-Wa,-nH $HWCAP_FLAGS"
- fi
- AC_MSG_RESULT($ac_hwcap_flags)
-
- CFLAGS="$ac_save_CFLAGS"
+ # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH
+ # with a different meaning.
+ case ${target_os} in
+ solaris2*)
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wa,-nH"
+
+ AC_MSG_CHECKING([for as that supports -Wa,-nH])
+ AC_TRY_COMPILE([], [return 0;], [ac_hwcap_flags=yes],[ac_hwcap_flags=no])
+ if test "$ac_hwcap_flags" = "yes"; then
+ HWCAP_FLAGS="-Wa,-nH $HWCAP_FLAGS"
+ fi
+ AC_MSG_RESULT($ac_hwcap_flags)
+
+ CFLAGS="$ac_save_CFLAGS"
+ ;;
+ esac
AC_SUBST(HWCAP_FLAGS)
])
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University