]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
MIPS: Don't add nan2008 option for -mtune=native
authorYunQiang Su <syq@gcc.gnu.org>
Sat, 23 Dec 2023 08:40:42 +0000 (16:40 +0800)
committerYunQiang Su <syq@gcc.gnu.org>
Sat, 23 Dec 2023 08:46:55 +0000 (16:46 +0800)
Users may wish just use -mtune=native for performance tuning only.
Let's don't make trouble for its case.

gcc/

* config/mips/driver-native.cc (host_detect_local_cpu):
don't add nan2008 option for -mtune=native.

gcc/config/mips/driver-native.cc

index 4ef48e149162e4f494b6da8bede87156b3b1a702..b8c37d692153adab19d5e4ee0dc809410485f919 100644 (file)
@@ -93,7 +93,8 @@ host_detect_local_cpu (int argc, const char **argv)
 fallback_cpu:
 #if defined (__mips_nan2008)
   /* Put the ret to the end of list, since it may be NULL.  */
-  ret = reconcat (ret, " -mnan=2008 ", ret, NULL);
+  if (arch)
+    ret = reconcat (ret, " -mnan=2008 ", ret, NULL);
 #endif
 
 #ifdef HAVE_GETAUXVAL