Skip to content

skip checking categorization of libperl symbols for LTO builds #20553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions t/porting/libperl.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# - freebsd
# and on other platforms, and if things seem odd, just give up (skip_all).
#
# Symbol types for LTO builds don't seem to match their final section, so
# skip on LTO builds too.
#
# Debugging tip: nm output (this script's input) can be faked by
# giving one command line argument for this script: it should be
# either the filename to read, or "-" for STDIN. You can also append
Expand Down Expand Up @@ -47,6 +50,15 @@ if ($Config{cc} =~ /g\+\+/) {
skip_all "on g++";
}

# ccname is gcc for both gcc and clang
if ($Config{ccname} eq "gcc" && $Config{ccflags} =~ /-flto\b/) {
# If we compile with gcc nm marks PL_no_mem as "D" (normal data) rather than a R (read only)
# but the symbol still ends up in the .rodata section of the image on linking.
# If we compile with clang 14, nm marks PL_no_mem as "T" (text, aka code) rather than R
# but the symbol still ends up in the .rodata section on linking.
skip_all "LTO libperl.a flags don't match the final linker sections";
}

my $libperl_a;

for my $f (qw(../libperl.a libperl.a)) {
Expand Down