Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2023 17:46:41 GMT
From:      "Alfonso S. Siciliano" <asiciliano@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ef0c6dcb3d07 - main - games/trigger-rally: fix build with lld 15 on i386
Message-ID:  <202303011746.321HkfF7017068@gitrepo.freebsd.org>

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

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

commit ef0c6dcb3d0725c090609342ce8239427d39ce3b
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2023-03-01 17:39:38 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2023-03-01 17:46:10 +0000

    games/trigger-rally: fix build with lld 15 on i386
    
    ld: error: ../bin/trigger-rally:(.eh_frame+0xa40b): internal linker
    error: wrote incorrect addend value 0x4A042E4A instead of 0x0 for
    dynamic relocation R_386_32 at offset 0x429B53 against symbol
    __gxx_personality_v0
    
    PR:             269812
    Reported by:    pkg-fallout
    Approved by:    fernape
---
 games/trigger-rally/Makefile | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/games/trigger-rally/Makefile b/games/trigger-rally/Makefile
index 747b5404bdb5..ff6d08904240 100644
--- a/games/trigger-rally/Makefile
+++ b/games/trigger-rally/Makefile
@@ -34,6 +34,16 @@ PORTDOCS=	README-stereo.txt README.txt DATA_AUTHORS.txt
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.pre.mk>
+
+# The following is actually meant for lld 15.0 and later, but the ports
+# framework does not support LINKER_TYPE and LINKER_VERSION yet.
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150
+# Turn off checking of dynamic relocations, to avoid lld diagnostics about
+# possibly incorrect addend values.
+LDFLAGS_i386+=	-Wl,--no-check-dynamic-relocations
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Trigger/main.cpp
 
@@ -53,4 +63,4 @@ do-install:
 	${MV} ${STAGEDIR}${DATADIR}/icon/trigger-rally-icons.svg \
 		${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/trigger-rally-icons.svg
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>



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