svn commit: r544611 - head/lang/perl5.32
Piotr Kubaj
pkubaj at FreeBSD.org
Mon Aug 10 12:17:38 UTC 2020
Author: pkubaj
Date: Mon Aug 10 12:17:37 2020
New Revision: 544611
URL: https://svnweb.freebsd.org/changeset/ports/544611
Log:
lang/perl5.32: fix build on powerpc head
When building on powerpc (powerpc64 is fine) on head (which uses Clang), the following command causes a build crash when compiled with -O2:
LD_LIBRARY_PATH=/wrkdirs/usr/ports/lang/perl5.32/work/perl-5.32.0 ./miniperl -Ilib make_ext.pl lib/auto/DB_File/DB_File.so MAKE="/usr/bin/make" LIBPERL_A=libperl.so.5.32.0 LINKTYPE=dynamic
Compiling with -O1 is fine. Base GCC on stable/12 is fine, so only Clang needs this workaround.
PR: 248561
Approved by: mat (maintainer)
Modified:
head/lang/perl5.32/Makefile
Modified: head/lang/perl5.32/Makefile
==============================================================================
--- head/lang/perl5.32/Makefile Mon Aug 10 11:24:40 2020 (r544610)
+++ head/lang/perl5.32/Makefile Mon Aug 10 12:17:37 2020 (r544611)
@@ -19,7 +19,7 @@ LICENSE_FILE_GPLv1+ = ${WRKSRC}/Copying
#DEPRECATED= Support ends three years after .0 release. Please upgrade to a more recent version of Perl
#EXPIRATION_DATE=<Release date of .0 + 3 years>
-USES= cpe tar:xz
+USES= compiler cpe tar:xz
# Give a hint of where libperl.so can be found.
USE_LDCONFIG= ${PREFIX}/${_ARCH_LIB}/CORE
@@ -179,6 +179,12 @@ _PERL5_DEFAULT_FILE= /tmp/PERL5_DEFAULT
CONFIGURE_ARGS+= -Accflags='-DUSE_THREAD_SAFE_LOCALE'
.endif
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == powerpc && ${CHOSEN_COMPILER_TYPE} == clang
+CFLAGS+= -O1
+.endif
+
# if this port is default due PERL5_DEFAULT
# change PKGNAME to reflect this
.if ${PERL_VER} == ${PERL5_DEFAULT}
@@ -290,4 +296,4 @@ post-install:
done
${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${STAGEDIR}${PREFIX}/etc/man.d/perl${PKGNAMESUFFIX}.conf
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
More information about the svn-ports-all
mailing list