From 1c584b45d46fa8cd4c1930ebbf0b4339fba25be1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 22 Mar 2018 00:52:15 +0100 Subject: Add more useful compiler flags for gcc --- backend/ninja/Ninja.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend') diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 614d08c..814f190 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -722,7 +722,7 @@ namespace backend // -Werror // TODO: Find equivalent -MMD -MP for other compilers than gcc. MMD is used to create "dependency files" -> if headers are modified then source files will be recompiled // when compiling next time... - result += " -MMD -MP '-I" + config.getPackageName() + "@exe' " + cflags + " '-I..' -Wall -Wextra -Werror=return-type -fdiagnostics-show-option '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Winvalid-pch' -fstack-protector " + optimizationFlags; + result += " -fpie -MMD -MP '-I" + config.getPackageName() + "@exe' " + cflags + " '-I..' -Wall -Wextra -Werror=return-type -fdiagnostics-show-option '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Winvalid-pch' -fstack-protector " + optimizationFlags; if(sourceFileLanguage == SourceFileLanguage::CPP) { result += " -fexceptions -Wnon-virtual-dtor"; @@ -731,7 +731,7 @@ namespace backend switch (config.getOptimizationLevel()) { case OPT_LEV_DEBUG: - result += " -g3"; + result += " -g3 -D_FORITY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fasynchronous-unwind-tables "; break; case OPT_LEV_RELEASE: result += " -g0"; -- cgit v1.2.3