Dominik Vogt <v...@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