From patchwork Mon Jan 7 16:39:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 209978 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 80DE22C0090 for ; Tue, 8 Jan 2013 03:40:27 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1358181628; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=ANRreNjeHuh0QyC6zGQJAnyPM+g=; b=HJjPGHeMTmREHcl cdjIzlXF4CR5CNELQVnJoBUxzYFzYVgnUpj7Bn3M8JQEt4oW7W6hJiVRv4O9b5jr 2mE1ylnC7eUiw2OPa5vtfFf28lcJw1kongAwSVST4W9gU0ZgFINSPnNDESFGlr/F t2ROzZvtCnrI6IYS8RBcnNJvQQ1E= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=QrLRP3GqP7oosVdz7KiP9UlQck5TnfYQXy80ogHxUdB1aVtFSjpULwXQezoRls /YQxmToJZP6NyMDyzN9IKzcjc428vmDBtWukjZ0GMrQD6+lSmK1/ZEI4HnfFJFy0 dQyM8vMlsLvx3NE5367c4GSvyM3OBGK5cq4IiUE9HsSQY=; Received: (qmail 8820 invoked by alias); 7 Jan 2013 16:40:05 -0000 Received: (qmail 8678 invoked by uid 22791); 7 Jan 2013 16:40:03 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Jan 2013 16:39:57 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 5206EF43; Mon, 7 Jan 2013 17:39:55 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PJcIOKr5lals; Mon, 7 Jan 2013 17:39:53 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id EB4ADF42; Mon, 7 Jan 2013 17:39:52 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id r07GdqWK007780; Mon, 7 Jan 2013 17:39:52 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org Subject: [v3, build] Restrict -Wa,-nH use to Solaris (PR libstdc++/55594) Date: Mon, 07 Jan 2013 17:39:52 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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) ])