Browse Source

Merge pull request #10498 from LoEE/jpc/master/perl-macos-fix

perl: fixed host compilation of static perl on MacOS
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
65baad1e79
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions
  1. +1
    -1
      lang/perl/Makefile
  2. +19
    -0
      lang/perl/patches/301-fix_macos_static_linking.patch

+ 1
- 1
lang/perl/Makefile View File

@ -11,7 +11,7 @@ include perlver.mk
PKG_NAME:=perl
PKG_VERSION:=$(PERL_VERSION)
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_URL:=\
https://cpan.metacpan.org/src/5.0 \


+ 19
- 0
lang/perl/patches/301-fix_macos_static_linking.patch View File

@ -0,0 +1,19 @@
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -2738,14 +2738,14 @@ sub _find_static_libs {
Called by a utility method of makeaperl. Checks whether a given file
is an XS library by seeing whether it defines any symbols starting
-with C<boot_>.
+with C<boot_> (with an optional leading underscore – needed on MacOS).
=cut
sub xs_static_lib_is_xs {
my ($self, $libfile) = @_;
my $devnull = File::Spec->devnull;
- return `nm $libfile 2>$devnull` =~ /\bboot_/;
+ return `nm $libfile 2>$devnull` =~ /\b_?boot_/;
}
=item makefile (o)

Loading…
Cancel
Save