I use yocto to build a system using clang as default system compiler. When using clang-21 RC2, resulting perl is not working correctly. A simple reproducer is
perl -e 'use Getopt::Std;'
instead of executing successfully results in
panic: magic_killbackrefs (flags=0) at /usr/lib/perl5/5.40.2/warnings.pm line 620.
Compilation failed in require at /usr/lib/perl5/5.40.2/Getopt/Std.pm line 4.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.40.2/Getopt/Std.pm line 4.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
This happens on x86_64 and also on arm64 targets.
If perl is built with -Doptimize='-O2 -fno-strict-aliasing' added to configure then it works correctly. It also works file when using just -O1
I do not have a further narrowed down reproducer than this yet.
I use yocto to build a system using clang as default system compiler. When using clang-21 RC2, resulting perl is not working correctly. A simple reproducer is
instead of executing successfully results in
This happens on x86_64 and also on arm64 targets.
If perl is built with
-Doptimize='-O2 -fno-strict-aliasing'added to configure then it works correctly. It also works file when using just-O1I do not have a further narrowed down reproducer than this yet.