mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
don't enable SECURITY_HARDENED on old gcc
on CentOS 5 x86 (at least) this results in a binary that cannot load plugins. Draw the line, quite arbitrarily, at gcc 4.6.
This commit is contained in:
parent
2156f62d2e
commit
f13cf62147
1 changed files with 6 additions and 1 deletions
|
@ -202,7 +202,12 @@ ENDIF()
|
|||
|
||||
# enable security hardening features, like most distributions do
|
||||
# in our benchmarks that costs about ~1% of performance, depending on the load
|
||||
OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ON)
|
||||
IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6")
|
||||
SET(security_default OFF)
|
||||
ELSE()
|
||||
SET(security_default ON)
|
||||
ENDIF()
|
||||
OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ${security_default})
|
||||
IF(SECURITY_HARDENED)
|
||||
# security-enhancing flags
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
|
||||
|
|
Loading…
Reference in a new issue