aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Jacobs <freebsd@dev.thsi.be>2024-02-04 18:13:23 +0000
committerCharlie Li <vishwin@FreeBSD.org>2024-02-04 19:30:27 +0000
commit5b0b801228eba3d1dfc39b9b595b3a089e118dc1 (patch)
tree5e22abe55436d10ecc25847eeb257f1726a874cf
parent1dec0ebf85b31b0b280e449fce879919c2033e0e (diff)
downloadports-5b0b801228eba3d1dfc39b9b595b3a089e118dc1.tar.gz
ports-5b0b801228eba3d1dfc39b9b595b3a089e118dc1.zip
lang/python311: Fix build on armv7 with LLVM 17
Reported by: brd PR: 276249
-rw-r--r--lang/python311/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/lang/python311/Makefile b/lang/python311/Makefile
index 9b8d5e69df96..6685942472ff 100644
--- a/lang/python311/Makefile
+++ b/lang/python311/Makefile
@@ -109,6 +109,15 @@ EXTRA_PATCHES+= ${PATCHDIR}/libressl
CONFIGURE_ENV+= ac_cv_working_openssl_hashlib=yes
.endif
+.include <bsd.port.pre.mk>
+
+# llvm17 with -flto=thin makes Programs/_freeze_module crash on armv7; workaround
+# cf. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276249
+.if ${ARCH} == armv7 && ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 170 && \
+ ${COMPILER_VERSION} < 180
+CONFIGURE_ARGS:= ${CONFIGURE_ARGS:N${LTO_CONFIGURE_ON}}
+.endif
+
post-patch:
# disable the detection of includes and library from e2fsprogs-libuuid,
# which introduces hidden dependency and breaks build
@@ -150,4 +159,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/Tools/gdb/libpython.py \
${STAGEDIR}${PREFIX}/lib/libpython${PYTHON_VER}${ABIFLAGS}.so.1.0-gdb.py
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>