From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13847 invoked by alias); 29 Jul 2015 20:52:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 13832 invoked by uid 89); 29 Jul 2015 20:52:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f179.google.com Received: from mail-wi0-f179.google.com (HELO mail-wi0-f179.google.com) (209.85.212.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 29 Jul 2015 20:52:18 +0000 Received: by wibxm9 with SMTP id xm9so217836854wib.0 for ; Wed, 29 Jul 2015 13:52:15 -0700 (PDT) X-Received: by 10.194.58.130 with SMTP id r2mr80681642wjq.72.1438203135659; Wed, 29 Jul 2015 13:52:15 -0700 (PDT) Received: from localhost ([95.144.14.199]) by smtp.googlemail.com with ESMTPSA id di7sm26184810wib.23.2015.07.29.13.52.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jul 2015 13:52:14 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: Re: [PATCH 0/4] S390 -march=native related fixes References: <20150717160050.GA17946@linux.vnet.ibm.com> <55B222EB.4020709@linux.vnet.ibm.com> <20150724142621.GA6914@linux.vnet.ibm.com> Date: Wed, 29 Jul 2015 21:19:00 -0000 In-Reply-To: <20150724142621.GA6914@linux.vnet.ibm.com> (Dominik Vogt's message of "Fri, 24 Jul 2015 15:26:21 +0100") Message-ID: <87wpxi8z5t.fsf@googlemail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2015-07/txt/msg02510.txt.bz2 Dominik Vogt writes: > With that problem fixed I still see one minor glitch. Maybe > someone knows how to fix the following: > > * With a cross compiler that generates i686 binaries on s390x: > > $ i686-elf-gcc -c ~/foo.c -march=native > /home/vogt/foo.c:1:0: error: bad value (native) for -march= switch > > This is all right because the x86 compiler just emits a brief > error message because the argument to -march= is a string. > > * The other way round, generating s390x binaries on i686: > > $ s390x-linux-gcc -c ~/foo.c -march=native > cc1: error: unrecognized argument in option '-march=native' > cc1: note: valid arguments to '-march=' are: g5 g6 native z10 z13 z196 z9-109 z9-ec z900 z990 zEC12 > > So, the error message complains about "native" not being a valid > argument to -march=, and then lists it as valid in the next line. > This is because s390x uses an Enum option, and "native" is one > of the allowed values. Nice spot :-) One way would be to have: %{mtune=native:%e-mtune=native is only supported for native configurations} in the non-native MARCH_MTUNE_NATIVE_SPECS, and similarly for -march. The problem is that that won't quote -mtune=native in the canonical way and I don't know how well it would handle intl (probably not very well). Maybe we should have a new .opt tag for native-only enum options. Thanks, Richard