py-matplotlib: disable link-time optimization for ports-gcc, ok daniel

The combination of a modern compiler with antique binutils isn't expected
in the ecosystem. On sparc64, LTO is enabled because the ports-gcc supports
it which then emits "e" sections which are to be excluded from executables
and shared objects by the link editor, such as

.section        .gnu.lto_.profile.5712db33fb59d8ee,"e",@progbits

As reported by kmos, Fred Flintstone's gas trips over these with

Fatal error: unrecognized .section attribute: want a,w,x,M,S,G,T
This commit is contained in:
tb
2026-03-29 08:36:22 +00:00
parent ce72cea9b0
commit ac9a185c1e
+6
View File
@@ -70,3 +70,9 @@ post-install:
cd ${WRKSRC}/galleries/examples && pax -rw * ${EXAMPLESDIR}
.include <bsd.port.mk>
.if ${CHOSEN_COMPILER} == "ports-gcc"
# as(1) can't deal with the "e" sections that port-gcc emits with -flto=auto
# Fatal error: unrecognized .section attribute: want a,w,x,M,S,G,T
MODPY_PYBUILD_ARGS+=--config-setting=setup-args=-Db_lto=false
.endif