diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-22 19:18:34 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-22 19:28:31 +0100 |
commit | 317ceb0ee22ee4bceaad97773082a425f0694a94 (patch) | |
tree | 6b9b2e6b5f9ad688e7171cc5de8af0b1daae6a2a /Userland/Libraries/LibSystem | |
parent | dc486fa3f90d7922c1a24e6f2e990dd35a76da26 (diff) | |
download | serenity-317ceb0ee22ee4bceaad97773082a425f0694a94.zip |
LibSystem: Disable stack protector in syscall wrappers on i686
This is a hack to avoid a circular dependency issue with the stack check
failure handler being in LibC.
This is not ideal, and there's most likely a better way to solve this.
That said, LibSystem should not have anything but thin wrappers around
system calls, so stack protectors have limited utility here anyway.
Diffstat (limited to 'Userland/Libraries/LibSystem')
-rw-r--r-- | Userland/Libraries/LibSystem/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibSystem/CMakeLists.txt b/Userland/Libraries/LibSystem/CMakeLists.txt index c45501ad18..a376338226 100644 --- a/Userland/Libraries/LibSystem/CMakeLists.txt +++ b/Userland/Libraries/LibSystem/CMakeLists.txt @@ -3,6 +3,11 @@ set(SOURCES syscall.cpp ) +# FIXME: This is a hack to avoid a circular dependency with LibC. Figure out a better way. +if ("${SERENITY_ARCH}" STREQUAL "i686") + set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS "-fno-stack-protector") +endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib") serenity_libc(LibSystem system) target_include_directories(LibSystem PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |