diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-10-30 20:20:30 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-10-30 22:35:59 +0000 |
| commit | 31f1950143a11eb5bc44e73bbcda0b125cad8efa (patch) | |
| tree | 6970676674227b404247bfd2a5286705494ae9a2 /CMakeScripts | |
| parent | Update Catalan translation (diff) | |
| download | inkscape-31f1950143a11eb5bc44e73bbcda0b125cad8efa.tar.gz inkscape-31f1950143a11eb5bc44e73bbcda0b125cad8efa.zip | |
CMake: enable -fstack-protector-strong by default
Diffstat (limited to 'CMakeScripts')
| -rw-r--r-- | CMakeScripts/DefineDependsandFlags.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index a8bb63276..4d01f3255 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -25,12 +25,13 @@ else() endif() # Errors for common mistakes +list(APPEND INKSCAPE_CXX_FLAGS "-fstack-protector-strong") list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format") # e.g.: printf("%s", std::string("foo")) list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format-security") # e.g.: printf(variable); list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-Og") # -Og for _FORTIFY_SOURCE. One could add -Weffc++ here to see approx. 6000 warnings list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-D_GLIBCXX_ASSERTIONS") if (CMAKE_COMPILER_IS_GNUCC) - list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables") + list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fexceptions -grecord-gcc-switches -fasynchronous-unwind-tables") if(CXX_COMPILER_VERSION VERSION_GREATER 8.0) list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fstack-clash-protection -fcf-protection") endif() @@ -71,7 +72,6 @@ if(WIN32) list(APPEND INKSCAPE_LIBS "-lgomp") list(APPEND INKSCAPE_LIBS "-lwinpthread") - list(APPEND INKSCAPE_LIBS "-lssp") # required for support of _FORTIFY_SOURCE with mingw-w64 if(HAVE_MINGW64) list(APPEND INKSCAPE_CXX_FLAGS "-m64") |
