aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-06-24 16:58:19 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-06-24 16:58:19 +0200
commit8d37375b0541d879b371b355c2ff5d57ddfcd53e (patch)
tree7730dcd205b9c85cb6d28279bd18fe0ab09b850f /gcc
parentd13073607fee805d1705336f672969e5db89fd2b (diff)
downloadgcc-8d37375b0541d879b371b355c2ff5d57ddfcd53e.zip
gcc-8d37375b0541d879b371b355c2ff5d57ddfcd53e.tar.gz
gcc-8d37375b0541d879b371b355c2ff5d57ddfcd53e.tar.bz2
re PR target/61570 (-march=native CPU you selected does not support x86-64 instruction under QEMU)
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: r211945
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/driver-i386.c5
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 00bad43..e29fcaf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/61570
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index 3e8a995..4cd0b3d 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -745,6 +745,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";