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.
Please make sure you report the problem upstream.
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.
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
Well, this is a patch for Perl, so the upstream is Perl here :-)