Skip to content
Snippets Groups Projects
Commit 05eba830 authored by Ilya Verbin's avatar Ilya Verbin Committed by Vladimir Davydov
Browse files

build: do not disable hardening on FreeBSD

It was disabled because dlsym tests failed when PIC is on (#7640).
However, later it turned out that the issue is not related to PIC, and
LuaJIT was turned off for such tests by commit 67e79b15 ("test: turn
LuaJIT off in tests with dlsym"). Now it's safe to turn on PIC for FreeBSD.

Follow-up #7536

NO_DOC=build
NO_TEST=build
parent bb7c1620
No related branches found
No related tags found
No related merge requests found
## feature/build
* Hardening against memory corruption attacks is now enabled by default on
FreeBSD (gh-7536).
# Depends on os.cmake and profile.cmake modules.
# Uses `ENABLE_FUZZER` option and `TARGET_OS_FREEBSD` variable.
# Uses `ENABLE_FUZZER` option and `TARGET_OS_DARWIN` variable.
# LuaJIT in FreeBSD doesn't work with PIC (gh-7640),
# ligomp.a for AArch64 CentOS is compiled without PIC support.
if (ENABLE_FUZZER OR TARGET_OS_FREEBSD OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
if (ENABLE_FUZZER OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
set(ENABLE_HARDENING_DEFAULT FALSE)
else()
set(ENABLE_HARDENING_DEFAULT TRUE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment