aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-03-22 00:52:15 +0100
committerdec05eba <dec05eba@protonmail.com>2018-03-22 00:52:22 +0100
commit1c584b45d46fa8cd4c1930ebbf0b4339fba25be1 (patch)
treed7fb7ca399dbdb2975517bad1f0fdda95daeab0a
parent060ca05a784b226041dbd4e12cf0c153101e4bee (diff)
Add more useful compiler flags for gcc
-rw-r--r--backend/ninja/Ninja.cpp4
1 files changed, 2 insertions, 2 deletions
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";