From 450c586db768e13ab12471f71b970477719b6c17 Mon Sep 17 00:00:00 2001 From: Huacai Chen Date: Fri, 10 Jan 2014 08:54:42 +0000 Subject: [PATCH] driver-native.c (host_detect_local_cpu): Handle new kernel strings for Loongson-2E/2F/3A. gcc/ 2014-01-10 Huacai Chen * config/mips/driver-native.c (host_detect_local_cpu): Handle new kernel strings for Loongson-2E/2F/3A. From-SVN: r206514 --- gcc/ChangeLog | 5 +++++ gcc/config/mips/driver-native.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ceb019d86568..1a97e536439d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-01-10 Huacai Chen + + * config/mips/driver-native.c (host_detect_local_cpu): Handle new + kernel strings for Loongson-2E/2F/3A. + 2014-01-08 Uros Bizjak Backport from mainline diff --git a/gcc/config/mips/driver-native.c b/gcc/config/mips/driver-native.c index f565c572e547..336fe6d7fe6e 100644 --- a/gcc/config/mips/driver-native.c +++ b/gcc/config/mips/driver-native.c @@ -116,11 +116,17 @@ host_detect_local_cpu (int argc, const char **argv) if (strncmp (buf, "cpu model", sizeof ("cpu model") - 1) == 0) { if (strstr (buf, "Godson2 V0.2") != NULL - || strstr (buf, "Loongson-2 V0.2") != NULL) + || strstr (buf, "Loongson-2 V0.2") != NULL + || strstr (buf, "Loongson-2E") != NULL) cpu = "loongson2e"; else if (strstr (buf, "Godson2 V0.3") != NULL - || strstr (buf, "Loongson-2 V0.3") != NULL) + || strstr (buf, "Loongson-2 V0.3") != NULL + || strstr (buf, "Loongson-2F") != NULL) cpu = "loongson2f"; + else if (strstr (buf, "Godson3 V0.5") != NULL + || strstr (buf, "Loongson-3 V0.5") != NULL + || strstr (buf, "Loongson-3A") != NULL) + cpu = "loongson3a"; else if (strstr (buf, "SiByte SB1") != NULL) cpu = "sb1"; else if (strstr (buf, "R5000") != NULL) -- 2.47.2