diff --git a/CMakeLists.txt b/CMakeLists.txt index 70bfff60590..992292e470c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,7 @@ endforeach() set(CMAKE_INSTALL_NAME_TOOL "") set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack") -set(CMAKE_CXX_LINK_FLAGS "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack") +set(CMAKE_CXX_LINK_FLAGS "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,max-page-size=0x1000") # We disable it completely because it makes cmake very spammy. # This will need to be revisited when the Loader supports RPATH/RUN_PATH. diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index f2c8ae77f71..d991bac2e9b 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -356,7 +356,7 @@ if (NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS) endif() if ("${SERENITY_ARCH}" STREQUAL "x86_64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large -fno-pic -mno-red-zone -z max-page-size=0x1000") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large -fno-pic -mno-red-zone") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE") endif()