On Thu, Dec 26, 2013 at 8:06 AM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Thu, Dec 26, 2013 at 7:45 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >>> On Thu, Dec 26, 2013 at 4:38 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >>> >> Hi Honza, >>> >> >>> >> We have combined generic32 and generic64 into generic. There is no need >>> >> to check "generic" anymore. Also we shouldn't change -mtune=i686 into >>> >> -mtune=generic. OK to install? >>> > >>> > The i686->generic change was intended to get generic optimized code >>> > for i686-linux configuration rather than pentiumpro. I think it still >>> > makes >>> > sense to use this, since it is what most 32bit distros still configure >>> > for? >>> > >>> >>> Should -mtune=i686 define __tune_i686__? If not, how can >>> it be defined? Don't we default -mtune to generic for >>> i686-linux? >> >> If i686-linux defaults to -mtune=generic, then I think it is all fine. > ... > > I will check in my patch. >
My patch exposes a testsuite bug: spawn -ignore SIGHUP /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/andor-2.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -mtune=i686 -ffat-lto-objects -ffat-lto-objects -S -o andor-2.s^M /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/andor-2.c:1:0: error: CPU you selected does not support x86-64 instruction set^M compiler exited with status 1 output is: /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/andor-2.c:1:0: error: CPU you selected does not support x86-64 instruction set^M FAIL: gcc.target/i386/andor-2.c (test for excess errors) We used to silently turn -mtune=i686 into -mtune=generic. Now we don't. It is wrong to accept -mtune=i686 when compiling for x86-64. I am checking in this patch as an obvious fix. Thanks. -- H.J. -- diff --git a/gcc/testsuite/gcc.target/i386/andor-2.c b/gcc/testsuite/gcc.target/i386/andor-2.c index 88118aa..eacc7b1 100644 --- a/gcc/testsuite/gcc.target/i386/andor-2.c +++ b/gcc/testsuite/gcc.target/i386/andor-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mtune=i686" } */ +/* { dg-options "-O2 -mtune=generic" } */ int h(int x, int y) {