From c20bc22bae1031ace705c9ab483f77260eefe549 Mon Sep 17 00:00:00 2001 From: Sönke Holz Date: Sun, 3 Mar 2024 22:21:07 +0100 Subject: DynamicLoader: Disable stack protector in some files for RISC-V --- Userland/DynamicLoader/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/DynamicLoader/CMakeLists.txt b/Userland/DynamicLoader/CMakeLists.txt index 1e7ab92ba1..d827efd398 100644 --- a/Userland/DynamicLoader/CMakeLists.txt +++ b/Userland/DynamicLoader/CMakeLists.txt @@ -33,8 +33,8 @@ set(SOURCES ${LOADER_SOURCES} ${AK_SOURCES} ${ELF_SOURCES} ${LIBC_SOURCES1} ${LI set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -nostdlib -pie -fpie -DNO_TLS") -if ("${SERENITY_ARCH}" STREQUAL "aarch64") - # On aarch64 the stack protector would be accessed before the Loader can relocate itself. +if (("${SERENITY_ARCH}" STREQUAL "aarch64") OR ("${SERENITY_ARCH}" STREQUAL "riscv64")) + # On aarch64 and riscv64 the stack protector would be accessed before the Loader can relocate itself. set_source_files_properties(main.cpp ../Libraries/LibELF/Relocation.cpp PROPERTIES COMPILE_FLAGS "-fno-stack-protector") endif() -- cgit v1.2.3