From 3b79fafb3f7bbcbe68418be747009d00f0221a43 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Fri, 22 Feb 2019 12:55:02 +0200 Subject: [PATCH] GccToolChain: Pass any -m flag for macro inspection There are *many* -m flags, and most of them affect the preprocessor macros. It doesn't make sense to have an endless list of "known" -m flags (which missed for example -mabi=*). Instead, just pass all of them to the compiler. Some lists: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html Change-Id: I1b412f6b75ef8e2dab4e172fb77f94dd76d12802 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/gcctoolchain.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index f36a6b9440e..f1e0ea4cb46 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -402,15 +402,7 @@ ToolChain::MacroInspectionRunner GccToolChain::createMacroInspectionRunner() con || a == "-gcc-toolchain" || a == "-target") { if (++iArg < allFlags.length()) arguments << a << allFlags.at(iArg); - } else if (a == "-m128bit-long-double" || a == "-m32" || a == "-m3dnow" - || a == "-m3dnowa" || a == "-m64" || a == "-m96bit-long-double" - || a == "-mabm" || a == "-maes" || a.startsWith("-march=") || a == "-mavx" - || a.startsWith("-masm=") || a.startsWith("-mfloat-abi") || a == "-mcx16" - || a == "-mfma" || a == "-mfma4" || a == "-mlwp" || a == "-mpclmul" - || a == "-mpopcnt" || a == "-msse" || a == "-msse2" || a == "-msse2avx" - || a == "-msse3" || a == "-msse4" || a == "-msse4.1" || a == "-msse4.2" - || a == "-msse4a" || a == "-mssse3" || a.startsWith("-mtune=") - || a == "-mxop" || a == "-Os" || a == "-O0" || a == "-O1" || a == "-O2" + } else if (a.startsWith("-m") || a == "-Os" || a == "-O0" || a == "-O1" || a == "-O2" || a == "-O3" || a == "-ffinite-math-only" || a == "-fshort-double" || a == "-fshort-wchar" || a == "-fsignaling-nans" || a == "-fno-inline" || a == "-fno-exceptions" || a == "-fstack-protector"