From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E3A8C388E838; Thu, 6 May 2021 13:34:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3A8C388E838 From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100347] [11/12 Regression] GCC 11 does not recognize skylake; translates "march=native" to "x86_64" Date: Thu, 06 May 2021 13:34:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2021 13:34:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100347 --- Comment #14 from Iain Sandoe --- (In reply to Erik Schnetter from comment #13) > The failing GCC 11.1.0 is built by Apple Clang 12.0.5 via Spack. Looking = at > debug output, I see that Spack inserts a "-march=3Dskylake" command line > option. (I was not aware of this before.) It does so by creating a compil= er > wrapper (called "clang++" as well), which calls the actual compiler and a= dds > this (and some other) flags.=20 >=20 > I seem to recall having read somewhere that GCC's CPU detection code must= be > built without any "-march=3D..." flag. well, the GCC config makes sensible default choices for CPU (if there's no --with-cpu=3D) - which is core2 mostly (so that the code should run anywher= e). As of this moment the only machines I've got builds with --with-cpu=3D spec= ify the correct CPU for the machine, so -march=3D isn't going to tell anything - except I can say for sure that it doesn't report x86_64): /src-local/gcc-master/configure --prefix=3D/opt/iains/x86_64-apple-darwin16/gcc-12-0-0d --build=3Dx86_64-apple-darwin16 --with-sysroot=3D/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --enable-languages=3Dall --with-cpu=3Dcorei7 --with-tune=3Dskylake CC=3Dx86_64-apple-darwin16-gcc CXX=3Dx86_64-apple-darwin16-g++ $ ./gcc/xgcc -Bgcc -march=3Dnative -Q --help=3Dtarget | grep march -march=3D skylake So that's reporting what was configures, but also what would be correct for= the hardware - it hasn't overridden the configuration settings. can we get the output of "gcc -v" for the compiler that isn't working? If this is a compiler built without bootstrap, and the bootstrap compiler is clang, then that could be an unknown quantity. Production compilers should= be bootstrapped.=