public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rdsandiford@googlemail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 0/4] S390 -march=native related fixes
Date: Wed, 29 Jul 2015 21:19:00 -0000	[thread overview]
Message-ID: <87wpxi8z5t.fsf@googlemail.com> (raw)
In-Reply-To: <20150724142621.GA6914@linux.vnet.ibm.com> (Dominik Vogt's	message of "Fri, 24 Jul 2015 15:26:21 +0100")

Dominik Vogt <vogt@linux.vnet.ibm.com> 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

      reply	other threads:[~2015-07-29 20:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 16:03 Dominik Vogt
2015-07-17 16:04 ` [PATCH 1/4] " Dominik Vogt
2015-07-17 16:05 ` [PATCH 2/4] " Dominik Vogt
2015-07-17 16:08 ` [PATCH 3/4] " Dominik Vogt
2015-07-17 16:43   ` Dominik Vogt
2015-07-18  0:22     ` Ulrich Weigand
2015-07-20 16:10       ` Dominik Vogt
2015-07-21 11:23         ` Ulrich Weigand
2015-07-21 12:53           ` Dominik Vogt
2015-07-21 17:15             ` Ulrich Weigand
2015-07-22 10:54               ` Dominik Vogt
2015-07-23 13:03                 ` Ulrich Weigand
2015-07-17 16:09 ` [PATCH 4/4] " Dominik Vogt
2015-07-24 11:38 ` [PATCH 0/4] " Andreas Krebbel
2015-07-24 14:39   ` Dominik Vogt
2015-07-29 21:19     ` Richard Sandiford [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpxi8z5t.fsf@googlemail.com \
    --to=rdsandiford@googlemail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).