]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/61570 (-march=native CPU you selected does not support x86-64 instructio...
authorJakub Jelinek <jakub@redhat.com>
Tue, 24 Jun 2014 15:13:32 +0000 (17:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 24 Jun 2014 15:13:32 +0000 (17:13 +0200)
PR target/61570
* config/i386/driver-i386.c (host_detect_local_cpu): For unknown
model family 6 CPU with has_longmode never use a CPU without
64-bit support.

From-SVN: r211948

gcc/ChangeLog
gcc/config/i386/driver-i386.c

index 45da7447803b531ab050a498e7a69a0eaa8bfb11..44896fb50d199bda492c9a4131d962a2c3ce5ae1 100644 (file)
@@ -1,3 +1,10 @@
+2014-06-24  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/61570
+       * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
+       model family 6 CPU with has_longmode never use a CPU without
+       64-bit support.
+
 2014-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
 
        Backport from mainline
index 148fbc227c1b70ec86f3cc542168ec9cb642391d..87b6a1b4ab6b529534533ba0080e02705209942a 100644 (file)
@@ -713,6 +713,11 @@ const char *host_detect_local_cpu (int argc, const char **argv)
                    /* Assume Core 2.  */
                    cpu = "core2";
                }
+             else if (has_longmode)
+               /* Perhaps some emulator?  Assume x86-64, otherwise gcc
+                  -march=native would be unusable for 64-bit compilations,
+                  as all the CPUs below are 32-bit only.  */
+               cpu = "x86-64";
              else if (has_sse3)
                /* It is Core Duo.  */
                cpu = "pentium-m";