1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00
freebsd-ports/games/minetest/files/patch-src_CMakeLists.txt
2021-06-03 13:56:18 +03:00

21 lines
953 B
Plaintext

diff --git src/CMakeLists.txt src/CMakeLists.txt
index 9526e88f9..06cb0d604 100644
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -758,7 +758,14 @@ else()
check_c_source_compiles("#ifndef __aarch64__\n#error\n#endif\nint main(){}" IS_AARCH64)
if(IS_AARCH64)
# Move text segment below LuaJIT's 47-bit limit (see issue #9367)
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Ttext-segment=0x200000000")
+ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ # XXX: lld linke needs another option; not sure how to check for lld specifically,
+ # so just checking for FreeBSD (which uses lld) for now. I'm also not sure if its
+ # equivalent replacement and haven't runtested it, but it at least builds
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--image-base=0x200000000")
+ else()
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Ttext-segment=0x200000000")
+ endif()
endif()
endif()