mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibM: Fix linking with LibM when compiling Userland without -O2
While playing with conditionally disabling -O2 optimization when building the Userland subdirectory, I discovered that we can no longer link errors without -O2. This happens as LibM.so doesn't link to anything else, resulting in no stack protector implementation. It appears that optimization somehow avoids this problem? To fix this inject LibC/ssp.cpp as we do with in dynamic loader.
This commit is contained in:
parent
d23425bfc0
commit
e706de8f91
Notes:
sideshowbarker
2024-07-18 17:29:42 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/e706de8f91d Pull-request: https://github.com/SerenityOS/serenity/pull/7405 Issue: https://github.com/SerenityOS/serenity/issues/5862
@ -1,7 +1,10 @@
|
||||
set(SOURCES
|
||||
math.cpp
|
||||
../LibC/ssp.cpp
|
||||
)
|
||||
|
||||
set_source_files_properties (../LibC/ssp.cpp PROPERTIES COMPILE_FLAGS
|
||||
"-fno-stack-protector")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib")
|
||||
serenity_libc(LibM m)
|
||||
|
Loading…
Reference in New Issue
Block a user