mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
Meta: Enable RELR relocations
Also add a check to serenity.sh to ensure that the toolchain is new enough for this feature to work.
This commit is contained in:
parent
7ab6816b49
commit
ba5bbde7ee
3 changed files with 25 additions and 1 deletions
|
@ -422,6 +422,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
link_directories(${TOOLCHAIN_ROOT}/lib/gcc/${SERENITY_ARCH}-pc-serenity/${GCC_VERSION}/)
|
||||
|
||||
set(TARGET_STRING "")
|
||||
|
||||
add_link_options(LINKER:-z,pack-relative-relocs)
|
||||
else() # Assume Clang
|
||||
add_compile_options(-Waddress-of-packed-member)
|
||||
add_compile_options(-faligned-allocation)
|
||||
|
@ -429,7 +431,7 @@ else() # Assume Clang
|
|||
# We need this in order to pick up the #define __serenity__, otherwise we end up including unistd.h into the linker script
|
||||
set(TARGET_STRING "--target=${CMAKE_CXX_COMPILER_TARGET}")
|
||||
|
||||
add_link_options(LINKER:--build-id=none)
|
||||
add_link_options(LINKER:--build-id=none LINKER:--pack-dyn-relocs=relr)
|
||||
endif()
|
||||
|
||||
macro (set_new_alignment alignment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue