ports/lang/perl5.34/files/patch-hints_freebsd.sh
Dimitry Andric 8c69fc20e6 lang/perl5*: alternative workaround for lld 15 and dtrace enabled
Modify the workaround committed in 4ae8ff941b 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:		4ae8ff941b
MFH:		2022Q3
2022-09-21 22:26:53 +02:00

24 lines
839 B
Bash

Remove libs that are not here on FreeBSD.
--- hints/freebsd.sh.orig 2022-02-19 12:15:55 UTC
+++ hints/freebsd.sh
@@ -88,6 +88,8 @@ case "$osvers" in
esac
libswanted=`echo $libswanted | sed 's/ malloc / /'`
libswanted=`echo $libswanted | sed 's/ bind / /'`
+ libswanted=`echo $libswanted | sed 's/ dl / /'`
+ libswanted=`echo $libswanted | sed 's/ c / /'`
# iconv gone in Perl 5.8.1, but if someone compiles 5.8.0 or earlier.
libswanted=`echo $libswanted | sed 's/ iconv / /'`
d_setregid='define'
@@ -102,6 +104,10 @@ case "$osvers" in
;;
esac
libswanted=`echo $libswanted | sed 's/ malloc / /'`
+ libswanted=`echo $libswanted | sed 's/ bind / /'`
+ libswanted=`echo $libswanted | sed 's/ dl / /'`
+ libswanted=`echo $libswanted | sed 's/ iconv / /'`
+ libswanted=`echo $libswanted | sed 's/ c / /'`
;;
esac