Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Aug 2020 12:17:37 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r544611 - head/lang/perl5.32
Message-ID:  <202008101217.07ACHbs4058282@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008101217.07ACHbs4058282>