[gcc r14-6812] MIPS: Don't add nan2008 option for -mtune=native

YunQiang Su syq@gcc.gnu.org
Sat Dec 23 08:47:36 GMT 2023


https://gcc.gnu.org/g:079455458e5665330abc9c8b0726b0b11e7016ee

commit r14-6812-g079455458e5665330abc9c8b0726b0b11e7016ee
Author: YunQiang Su <syq@gcc.gnu.org>
Date:   Sat Dec 23 16:40:42 2023 +0800

    MIPS: Don't add nan2008 option for -mtune=native
    
    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.

Diff:
---
 gcc/config/mips/driver-native.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/config/mips/driver-native.cc b/gcc/config/mips/driver-native.cc
index 4ef48e14916..b8c37d69215 100644
--- a/gcc/config/mips/driver-native.cc
+++ b/gcc/config/mips/driver-native.cc
@@ -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


More information about the Gcc-cvs mailing list