Dominik Vogt wrote: > * config/s390/driver-native.c (s390_host_detect_local_cpu): Handle > processor capabilities with -march=native. > * config/s390/s390.h (MARCH_MTUNE_NATIVE_SPECS): Likewise. > (DRIVER_SELF_SPECS): Likewise. Join specs for 31 and 64 bit. > * (S390_TARGET_BITS_STRING): Macro to simplify specs.
This version is looking good, except for one problem: > - "%{!m31:%{!m64:-m64}}", \ > - "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \ > - "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}", \ There's a reason for this particular sequence. The first line ensures that one of -m64 or -m31 is present. The second line ensures that one of -mesa or -mzarch is present, but this works only if already one of -m64 or -m31 is present, so it needs to come *after* the first line. The third line ensures that some -march= switch is present, but this works only if already one of -mesa or -mzarch is present, so it needs to comer *after* the second line. > +#define DRIVER_SELF_SPECS \ > + "%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}} " \ > + "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}} " \ > + MARCH_MTUNE_NATIVE_SPECS \ > + "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}} " This inverts the order of the second and third lines, so it is now no longer guaranteed that at least one -march= switch is present. I understand that you need to move MARCH_MTUNE_NATIVE_SPECS ahead of the -mesa/-mzarch defaulting rule, but it should be possible to do that without changing the sequence of the three existing rules. Why not just move MARCH_MTUNE_NATIVE_SPECS first? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain ulrich.weig...@de.ibm.com