Bug 248561

Summary: lang/perl5.32: fix build on powerpc head
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Mathieu Arnold <mat>
Status: Closed FIXED    
Severity: Affects Only Me CC: mat, powerpc
Priority: --- Flags: bugzilla: maintainer-feedback? (mat)
Version: Latest   
Hardware: powerpc   
OS: Any   
Attachments:
Description Flags
patch mat: maintainer-approval+

Description Piotr Kubaj freebsd_committer 2020-08-09 19:10:21 UTC
Created attachment 217118 [details]
patch

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.
Comment 1 Mathieu Arnold freebsd_committer 2020-08-10 07:46:04 UTC
Please make sure you report the problem upstream.
Comment 2 Piotr Kubaj freebsd_committer 2020-08-10 12:15:56 UTC
What upstream do you mean (Perl or LLVM)? LLVM 11 is already at RC1 and it will probably hit head soon. I don't know whether Perl with LLVM 11 and -O2 will build fine, but it's possible, in that case -O1 will be only a temporary workaround.

If LLVM 11 doesn't work as well, I will certainly report it to LLVM bugzilla.
Comment 3 commit-hook freebsd_committer 2020-08-10 12:17:52 UTC
A commit references this bug:

Author: pkubaj
Date: Mon Aug 10 12:17:38 UTC 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)

Changes:
  head/lang/perl5.32/Makefile
Comment 4 Mathieu Arnold freebsd_committer 2020-08-10 12:40:46 UTC
Well, this is a patch for Perl, so the upstream is Perl here :-)