]> code.ossystems Code Review - openembedded-core.git/commitdiff
perl: replace a patch with a config option
authorAlexander Kanavin <alex.kanavin@gmail.com>
Sat, 4 Dec 2021 07:12:59 +0000 (08:12 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Dec 2021 11:09:47 +0000 (11:09 +0000)
Instead of patching in LDFLAGS into makefiles, simply
append them to 'lddlflags' (perl's keyword for 'linker flags').

See here for upstream discussions:
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/406
https://github.com/arsv/perl-cross/pull/124

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch [deleted file]
meta/recipes-devtools/perl/perl_5.34.0.bb

diff --git a/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch b/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
deleted file mode 100644 (file)
index 1acf3dd..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From 2f74a899474f428a4a5368a94accf801c5f97ae4 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 4 Jun 2018 18:33:50 +0300
-Subject: [PATCH] ExtUtils-MakeMaker: add $(LDFLAGS) when linking binary
- modules
-
-Upstream-Status: Submitted [https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/405]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index fe53be1..249c048 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -1050,7 +1050,7 @@ sub xs_make_dynamic_lib {
-     }
-     push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $dlsyms_arg, $ldfrom, $self->xs_obj_opt('$@'), $libs, $exportlist;
--      %s$(LD) %s $(LDDLFLAGS) %s %s $(OTHERLDFLAGS) %s $(MYEXTLIB) \
-+      %s$(LD) %s $(LDDLFLAGS) %s %s $(LDFLAGS) $(OTHERLDFLAGS) %s $(MYEXTLIB) \
-         $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) %s \
-         $(INST_DYNAMIC_FIX)
-       $(CHMOD) $(PERM_RWX) $@
index 16d45ccff31a6dd300994e76a387993b4a8cd29e..a6ae80f07e1a2fbc1ed3baab27e5004f166b7127 100644 (file)
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
 
 SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
            file://perl-rdepends.txt \
-           file://0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch \
            file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
            file://errno_ver.diff \
            file://native-perlinc.patch \
@@ -59,6 +58,7 @@ do_configure:class-target() {
     -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
     -Dlibpth='${libdir} ${base_libdir}' \
     -Dglibpth='${libdir} ${base_libdir}' \
+    -Alddlflags=' ${LDFLAGS}' \
     ${PACKAGECONFIG_CONFARGS}
 
     #perl.c uses an ARCHLIB_EXP define to generate compile-time code that
@@ -83,6 +83,7 @@ do_configure:class-nativesdk() {
     -Dsoname=libperl.so.5 \
     -Dvendorprefix=${prefix} \
     -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
+    -Alddlflags=' ${LDFLAGS}' \
     ${PACKAGECONFIG_CONFARGS}
 
     # See the comment above
@@ -96,6 +97,7 @@ do_configure:class-native() {
     -Dsoname=libperl.so.5 \
     -Dvendorprefix=${prefix} \
     -Ui_xlocale \
+    -Alddlflags=' ${LDFLAGS}' \
     ${PACKAGECONFIG_CONFARGS}
 }