Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jun 2021 11:33:40 GMT
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f9478b4f40b8 - main - games/minetest: fix link on aarch64
Message-ID:  <202106031133.153BXe5o069330@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f9478b4f40b89897a8f44f766562123f14b79576

commit f9478b4f40b89897a8f44f766562123f14b79576
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-06-02 19:44:20 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-06-03 10:56:18 +0000

    games/minetest: fix link on aarch64
---
 games/minetest/files/patch-src_CMakeLists.txt | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/games/minetest/files/patch-src_CMakeLists.txt b/games/minetest/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..83617a6d4002
--- /dev/null
+++ b/games/minetest/files/patch-src_CMakeLists.txt
@@ -0,0 +1,20 @@
+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()
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106031133.153BXe5o069330>