mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
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.
This commit is contained in:
parent
dc486fa3f9
commit
317ceb0ee2
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,11 @@ set(SOURCES
|
||||||
syscall.cpp
|
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")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib")
|
||||||
serenity_libc(LibSystem system)
|
serenity_libc(LibSystem system)
|
||||||
target_include_directories(LibSystem PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(LibSystem PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue