Don't enable LTO on riscv64

where lld fails with:
LLVM ERROR: Function Import: link error: linking module flags 'SmallDataLimit': IDs have conflicting values in
'extcap/CMakeFiles/extcap-base.dir/extcap-base.c.o' and 'extcap/CMakeFiles/sshdump.dir/sshdump.c.o

Error already spotted in games/arx-libertatis.  ok sthen@ (maintainer)
This commit is contained in:
jca 2022-11-15 23:46:40 +00:00
parent e15764a302
commit 7d6ce284d0
1 changed files with 4 additions and 1 deletions

View File

@ -119,7 +119,10 @@ CONFIGURE_ARGS += -DCMAKE_INSTALL_MANDIR=${TRUEPREFIX}/man \
.include <bsd.port.arch.mk>
.if ${PROPERTIES:Mlld}
# Enable LTO where suported, except on riscv64 where it fails with:
# LLVM ERROR: Function Import: link error: linking module flags 'SmallDataLimit': IDs have conflicting values in
# 'extcap/CMakeFiles/extcap-base.dir/extcap-base.c.o' and 'extcap/CMakeFiles/sshdump.dir/sshdump.c.o
.if ${PROPERTIES:Mlld} && ${MACHINE_ARCH} != "riscv64"
CONFIGURE_ARGS += -DENABLE_LTO=true
.endif