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 <r...@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