Enabled hardened executables by default.

The result of running "hardening-check wesnoth" now shows:
* Position Independent Executable: yes
* Stack protected: yes
* Fortify Source functions: yes (some protected functions found)
* Read-only relocations: yes
* Immediate binding: yes
This commit is contained in:
Pentarctagon 2018-06-15 00:13:53 -05:00
parent 4ed4660349
commit 7d180c93e0
2 changed files with 2 additions and 1 deletions

View file

@ -140,6 +140,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
option(ENABLE_APPDATA_FILE "enable installation of an appdata file for appstream" ON)
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
option(HARDEN "Whether to enable options to harden the executables" ON)
option(ENABLE_STRICT_COMPILATION "Sets the strict compilation mode" OFF)
option(ENABLE_PEDANTIC_COMPILATION "Sets the pedantic compilation mode" OFF)
option(ENABLE_DEBUG_WINDOW_LAYOUT "Add the debug option to allow the generation of debug layout files in dot format" OFF)

View file

@ -55,7 +55,7 @@ opts.AddVariables(
('extra_flags_profile', 'Extra compiler and linker flags to use for profile builds', ""),
BoolVariable('enable_lto', 'Whether to enable Link Time Optimization for build=release', False),
('arch', 'What -march option to use for build=release, will default to pentiumpro on Windows', ""),
BoolVariable('harden', 'Whether to enable options to harden the executables', False),
BoolVariable('harden', 'Whether to enable options to harden the executables', True),
BoolVariable('glibcxx_debug', 'Whether to define _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC for build=debug', False),
EnumVariable('profiler', 'profiler to be used for build=profile', "gprof", ["gprof", "gcov", "gperftools", "perf"]),
EnumVariable('pgo_data', 'whether to generate profiling data for PGO, or use existing profiling data', "", ["", "generate", "use"]),