diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-09-19 18:54:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-09-19 18:54:14 +0000 |
commit | 4ae8ff941b29191641e22a06e39ea27aa38c7848 (patch) | |
tree | 97884c61da768630ca6ddfadc1d3f951db0ac508 /lang/perl5.32 | |
parent | 0da40873e4e03055ab3c4993615ede52f360a77c (diff) | |
download | ports-4ae8ff941b29191641e22a06e39ea27aa38c7848.tar.gz ports-4ae8ff941b29191641e22a06e39ea27aa38c7848.zip |
lang/perl5*: work around duplicate symbol errors with lld 15 and dtrace enabled
Building any of the lang/perl5* ports with clang and lld 15, and the
DTRACE option enabled (which is default on) results in link errors
similar to:
cc -pthread -Wl,-E -fstack-protector-strong -L/usr/local/lib -o miniperl mpdtrace/opmini.o mpdtrace/perlmini.o mpdtrace/universalmini.o mpdtrace/gv.o mpdtrace/toke.o mpdtrace/perly.o mpdtrace/pad.o mpdtrace/regcomp.o mpdtrace/dump.o mpdtrace/util.o mpdtrace/mg.o mpdtrace/reentr.o mpdtrace/mro_core.o mpdtrace/keywords.o mpdtrace/builtin.o mpdtrace/hv.o mpdtrace/av.o mpdtrace/run.o mpdtrace/pp_hot.o mpdtrace/sv.o mpdtrace/pp.o mpdtrace/scope.o mpdtrace/pp_ctl.o mpdtrace/pp_sys.o mpdtrace/doop.o mpdtrace/doio.o mpdtrace/regexec.o mpdtrace/utf8.o mpdtrace/taint.o mpdtrace/deb.o mpdtrace/globals.o mpdtrace/perlio.o mpdtrace/numeric.o mpdtrace/mathoms.o mpdtrace/locale.o mpdtrace/pp_pack.o mpdtrace/pp_sort.o mpdtrace/caretx.o mpdtrace/dquote.o mpdtrace/time64.o mpdtrace/miniperlmain.o dtrace_mini.o -lpthread -lm -lcrypt -lutil
ld: error: duplicate symbol: __dtraceenabled_perl___sub__entry
>>> defined in mpdtrace/pp_hot.o
>>> defined in mpdtrace/pp_sort.o
ld: error: duplicate symbol: __dtraceenabled_perl___sub__entry
>>> defined in mpdtrace/pp_hot.o
>>> defined in mpdtrace/regexec.o
ld: error: duplicate symbol: __dtraceenabled_perl___op__entry
>>> defined in mpdtrace/perlmini.o
>>> defined in mpdtrace/run.o
ld: error: duplicate symbol: __dtraceenabled_perl___op__entry
>>> defined in mpdtrace/perlmini.o
>>> defined in mpdtrace/dump.o
ld: error: duplicate symbol: __dtraceenabled_perl___sub__entry
>>> defined in mpdtrace/pp_hot.o
>>> defined in mpdtrace/pp_ctl.o
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Work around these errors by allowing multiple definitions during
linking, using the --allow-multiple-definition linker flag. (Note: this
flag is also supported by GNU ld.)
PR: 265516
Approved by: maintainer timeout (1 month)
MFH: 2022Q3
Diffstat (limited to 'lang/perl5.32')
-rw-r--r-- | lang/perl5.32/Makefile | 2 | ||||
-rw-r--r-- | lang/perl5.32/files/patch-hints_freebsd.sh | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lang/perl5.32/Makefile b/lang/perl5.32/Makefile index d83f6b8d86ad..fb99eef6dae8 100644 --- a/lang/perl5.32/Makefile +++ b/lang/perl5.32/Makefile @@ -1,6 +1,6 @@ PORTNAME= perl DISTVERSION= ${PERL_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN/../../src/5.0 DIST_SUBDIR= perl diff --git a/lang/perl5.32/files/patch-hints_freebsd.sh b/lang/perl5.32/files/patch-hints_freebsd.sh index efcbcfea109d..735ec399fc3d 100644 --- a/lang/perl5.32/files/patch-hints_freebsd.sh +++ b/lang/perl5.32/files/patch-hints_freebsd.sh @@ -1,6 +1,6 @@ Remove libs that are not here on FreeBSD. ---- hints/freebsd.sh.orig 2016-12-05 10:28:13 UTC +--- hints/freebsd.sh.orig 2020-12-18 09:58:48 UTC +++ hints/freebsd.sh @@ -88,6 +88,8 @@ case "$osvers" in esac @@ -22,3 +22,14 @@ 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 |