diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-09-21 22:24:33 +0200 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-09-21 22:26:53 +0200 |
commit | 8c69fc20e6c71c3c5e71c8c9fcfb08ea9d5eb48d (patch) | |
tree | bc5ca999b54417ccf107691f2e28f44f6a29d6a3 /lang/perl5-devel | |
parent | security/uacme: Adopt/Update to upstream/1.7.3 (diff) |
lang/perl5*: alternative workaround for lld 15 and dtrace enabled
Modify the workaround committed in 4ae8ff941b29 by only adding
-Wl,--allow-multiple-definition to the two link command lines that
require it, instead of adding it to hints/freebsd.sh
Otherwise, that linker flag is emitted into perl's global configuration
(/usr/local/lib/perl5/5.xx/mach/Config_heavy.pl), and might be used by
other ports which link in libperl, such as www/mod_perl2, which cannot
correctly handle any unexpected linker flags, leading to errors.
PR: 265516
Reported by: lev
Approved by: maintainer timeout (1 month)
Fixes: 4ae8ff941b29
MFH: 2022Q3
Diffstat (limited to 'lang/perl5-devel')
-rw-r--r-- | lang/perl5-devel/Makefile | 2 | ||||
-rw-r--r-- | lang/perl5-devel/files/patch-Makefile.SH | 22 | ||||
-rw-r--r-- | lang/perl5-devel/files/patch-hints_freebsd.sh | 11 |
3 files changed, 21 insertions, 14 deletions
diff --git a/lang/perl5-devel/Makefile b/lang/perl5-devel/Makefile index e8a750695e78..b5327135ea98 100644 --- a/lang/perl5-devel/Makefile +++ b/lang/perl5-devel/Makefile @@ -4,7 +4,7 @@ PORTNAME= perl DISTVERSIONPREFIX= v DISTVERSION= ${GH_TAGNAME:C/^v//:C/-g[0-9a-f]*$//} DISTVERSIONSUFFIX= ${GH_TAGNAME:C/.*-g/-g/} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang devel perl5 # XXX Leave only CPAN. MASTER_SITES= LOCAL/mat/perl \ diff --git a/lang/perl5-devel/files/patch-Makefile.SH b/lang/perl5-devel/files/patch-Makefile.SH index c65b5dfc7a30..b2a2691d922c 100644 --- a/lang/perl5-devel/files/patch-Makefile.SH +++ b/lang/perl5-devel/files/patch-Makefile.SH @@ -1,8 +1,8 @@ Allow customisation of shrpldflags. ---- Makefile.SH.orig 2015-09-08 05:21:36 UTC +--- Makefile.SH.orig 2022-06-19 19:29:35 UTC +++ Makefile.SH -@@ -40,7 +40,6 @@ esac +@@ -40,7 +40,6 @@ linklibperl_nonshr='' pwd="`pwd`" linklibperl='$(LIBPERL)' linklibperl_nonshr='' @@ -10,3 +10,21 @@ Allow customisation of shrpldflags. ldlibpth='' DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB' DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL' +@@ -924,7 +923,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOADER) $(LIBPERLE + true) + $spitshell >>$Makefile <<'!NO!SUBS!' + rm -f $@ +- $(LD) -o $@ $(SHRPLDFLAGS) $(perllib_objs) $(DYNALOADER) $(libs) ++ $(LD) -o $@ $(SHRPLDFLAGS) -Wl,--allow-multiple-definition $(perllib_objs) $(DYNALOADER) $(libs) + !NO!SUBS! + case "$osname" in + aix) +@@ -1015,7 +1014,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep) write_buildc + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl + -@rm -f miniperl.xok +- $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ ++ $(CC) $(CLDFLAGS) -Wl,--allow-multiple-definition -o $(MINIPERL_EXE) \ + $(miniperl_objs) $(libs) + $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + $(MINIPERL) -f write_buildcustomize.pl diff --git a/lang/perl5-devel/files/patch-hints_freebsd.sh b/lang/perl5-devel/files/patch-hints_freebsd.sh index 359ca12088c1..9907c745ded7 100644 --- a/lang/perl5-devel/files/patch-hints_freebsd.sh +++ b/lang/perl5-devel/files/patch-hints_freebsd.sh @@ -22,14 +22,3 @@ Remove libs that are not here on FreeBSD. ;; esac -@@ -142,8 +148,8 @@ case "$osvers" in - *) - libpth="/usr/lib /usr/local/lib" - glibpth="/usr/lib /usr/local/lib" -- ldflags="-Wl,-E " -- lddlflags="-shared " -+ ldflags="-Wl,-E,--allow-multiple-definition" -+ lddlflags="-shared -Wl,--allow-multiple-definition" - cccdlflags='-DPIC -fPIC' - ;; - esac |