From 1dc0914bf0a2b655b8e4e2bd580c482a4454a58e Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 16 Apr 2022 23:06:16 +0200 Subject: [PATCH] Chop out -g from CFLAGS/LDFLAGS unless under WITH_DEBUG=yes. -g breaks build with LTO on machines with low RAM. --- lang/python38/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lang/python38/Makefile b/lang/python38/Makefile index 6af1d37ee1db..2c91772d072b 100644 --- a/lang/python38/Makefile +++ b/lang/python38/Makefile @@ -128,6 +128,11 @@ post-patch: @${ECHO_CMD} ${_module} >> ${WRKSRC}/Modules/Setup.local . endfor +.if !defined(WITH_DEBUG) || empty(WITH_DEBUG) || ${WITH_DEBUG} == no +post-configure: + ${REINPLACE_CMD} -Ee '/^CONFIGURE_(C|LD)FLAGS/{s/[[:space:]]+-g//g;}' ${WRKSRC}/Makefile +.endif + post-install: .if ! ${PORT_OPTIONS:MDEBUG} ${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: https://bugs.python.org/issue17975 -- 2.35.2