From: YunQiang Su Date: Sat, 23 Dec 2023 08:40:42 +0000 (+0800) Subject: MIPS: Don't add nan2008 option for -mtune=native X-Git-Tag: releases/gcc-13.3.0~605 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd8cd13a026812e0fb35cd726ee437c8beb7cfc;p=thirdparty%2Fgcc.git 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 --git a/gcc/config/mips/driver-native.cc b/gcc/config/mips/driver-native.cc index 4ef48e149162..b8c37d692153 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