summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-09-12 09:09:36 -0400
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-09-12 17:26:41 +0000
commit22b2ca7b8ece9e99ac497c5df942bb72a664428e (patch)
treebeb18215f4562e8c389e6ab55fe5d2235b2bd8fd
parent9a1181f748c189470bc21dc74224eb0f72798df6 (diff)
downloadserenity-22b2ca7b8ece9e99ac497c5df942bb72a664428e.zip
Kernel: Build Prekernel with -fno-threadsafe-statics
Else, function-local statics create calls to __cxa_guard_acquire / __cxa_guard_release on aarch64, which we don't (yet?) implement. Since Prekernel is single-threaded, just sidestep that for now.
-rw-r--r--Kernel/Prekernel/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Prekernel/CMakeLists.txt b/Kernel/Prekernel/CMakeLists.txt
index 7943e05b69..3f88b88074 100644
--- a/Kernel/Prekernel/CMakeLists.txt
+++ b/Kernel/Prekernel/CMakeLists.txt
@@ -31,7 +31,7 @@ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
add_executable(${PREKERNEL_TARGET} ${SOURCES})
-target_compile_options(${PREKERNEL_TARGET} PRIVATE -no-pie -fno-pic)
+target_compile_options(${PREKERNEL_TARGET} PRIVATE -no-pie -fno-pic -fno-threadsafe-statics)
target_link_options(${PREKERNEL_TARGET} PRIVATE LINKER:-T ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld -nostdlib LINKER:--no-pie)
set_target_properties(${PREKERNEL_TARGET} PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld)