diff options
author | Benjamin Jacobs <freebsd@dev.thsi.be> | 2024-02-04 18:13:23 +0000 |
---|---|---|
committer | Charlie Li <vishwin@FreeBSD.org> | 2024-02-08 06:57:42 +0000 |
commit | a42b94911f1a406fbc2e0efc46376c33e866e33b (patch) | |
tree | a49fc06b1d2099efd76d88cac4550bd3f943239c | |
parent | 7535bc5bf17b9ee97b016817c3c2b5ae29603fc4 (diff) | |
download | ports-a42b94911f1a406fbc2e0efc46376c33e866e33b.tar.gz ports-a42b94911f1a406fbc2e0efc46376c33e866e33b.zip |
lang/python311: Fix build on armv7 with LLVM 17
Reported by: brd
PR: 276249
(cherry picked from commit 5b0b801228eba3d1dfc39b9b595b3a089e118dc1)
-rw-r--r-- | lang/python311/Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lang/python311/Makefile b/lang/python311/Makefile index 7a79bb544cce..f2b04ef29cc9 100644 --- a/lang/python311/Makefile +++ b/lang/python311/Makefile @@ -107,6 +107,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 @@ -148,4 +157,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> |