From nobody Tue Jul 11 20:20:11 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R0sgH4WMWz2tlkX; Tue, 11 Jul 2023 20:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R0sgH3rp2z3mbL; Tue, 11 Jul 2023 20:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689106811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1lDfV/HZQfFaf4bFc3PRUtaXWBbILihY8Gac/rxlsPU=; b=kD3x6lOpobs99cwjhw2D7KsW2P51B68z+VV+mVhU3XxFI7tVuveR+2aQQJmGtm2OYYSUmP ELDNAM884G5lk9+dsjwPCUXFpJ/aL4AN8BnBTMIw0JV2idtfnn2hRMxhIiUVOgZp7JR26k N64boTruc+esKDu7sHhQUZYIx0W4m3JNeObrfumkxWT24Dmv9604VBl2ayDlOu7tmcOjcN 7sw/9TC6dFni8B6WhkLUtYWXsBEfsCqdLq0pI4lGDykgnpKgo56o+pGMsZxmRY6Zx7dXYB egAZI7lUUqi3rsJy3zgdoUGK+v58/e/7bJ61l6a3QxslFZl8Rk/3gSMQTxl/eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689106811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1lDfV/HZQfFaf4bFc3PRUtaXWBbILihY8Gac/rxlsPU=; b=URLpkPBLhI+IPiMIBbwLwJTPx6CYp/xXSFn7nscI/FkJhLfIen3sEfMmPbodQRSFnIcPaK LXfzd1wxgVP6zvPlG/RgkuqVS0L894QdM8Gr+HfUESAkeT4fW01eMI1eq8dDkbPfqxnd9I Yi3EUl62gSc+r2cWxDTiK9tnfnaFJ4x7z5EzcaoldEoG182+t1qpOwtJD6fXcNBiowYsdp XrXlph0fRdPeMUSbqr5K+R+O6NIOtVnSKGVBOcATKubmqnINGWp3JphXBrBgjniNkP/n5M VSQJ6zUL5noBcB4iFnmUJET4gDl02ZAs6YplHbIEcqYI1K74Z+rHQlny1RodaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689106811; a=rsa-sha256; cv=none; b=w/+28VsXtfyul6I5acpIJoG5esZ9rzwZQJWBQ/ZzA1u+KC9Zk+0007HIoEpM4xWRuUcQdu 0NtzTiwG5f3EeinmSESvWI1/OndXWggETOeJS/ALZtAlKnLcnbZBVn1FiVmGEApmtOYwJh 1LUdypee/RqHqoiFBQ2z3uPSew730Au9MZ0V3yt5E7gA455dY46JO5816vgaybpCzT2TA8 WWqLuprF6HD2tkfF1GE+ZMTgI/6HZ9xalItCw5YdiHNkYaVzflpXfoSm2ZaTH7PLYWV/f+ inwcUudqHCdv6kTpKPF2Laq1DKeopxTjUFPRiFcDSL2QFmQKwe894i3mJ+2xyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R0sgH2vVrzgTL; Tue, 11 Jul 2023 20:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36BKKBIf026819; Tue, 11 Jul 2023 20:20:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36BKKBAH026813; Tue, 11 Jul 2023 20:20:11 GMT (envelope-from git) Date: Tue, 11 Jul 2023 20:20:11 GMT Message-Id: <202307112020.36BKKBAH026813@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Tijl Coosemans Subject: git: 0b59b9276418 - main - lang/perl5*: Link with -pthread instead of -lpthread List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b59b9276418ce4fce8a73871a13598397ab2f2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tijl: URL: https://cgit.FreeBSD.org/ports/commit/?id=0b59b9276418ce4fce8a73871a13598397ab2f2e commit 0b59b9276418ce4fce8a73871a13598397ab2f2e Author: Tijl Coosemans AuthorDate: 2023-07-04 14:22:05 +0000 Commit: Tijl Coosemans CommitDate: 2023-07-11 20:10:58 +0000 lang/perl5*: Link with -pthread instead of -lpthread During configure of security/p5-Crypt-GCrypt a test program is compiled and run to test libgcrypt. This program segfaults when perl5 is built with the THREADS option. Libgcrypt links with libgpg-error which has an init function which calls into libintl (gettext) which calls pthread functions before libthr is initialised. The compiler command line is provided by perl and it includes both -pthread and -lpthread. Patch perl to remove -lpthread. With -pthread the compiler will pass -lpthread to the linker such that it is initialised early. Discovered by the exp-run for gettext 0.22. While here also remove -lc unconditionally and remove the code that replaced it with -lc_r for old version of FreeBSD because the version test is incorrect (missing a dot). The -pthread flag already tells the compiler to use -lc_r on those old versions. PR: 272210 --- lang/perl5-devel/Makefile | 2 +- lang/perl5-devel/files/patch-hints_freebsd.sh | 43 ++++++++++++++++++++------- lang/perl5.32/Makefile | 2 +- lang/perl5.32/files/patch-hints_freebsd.sh | 41 +++++++++++++++++++------ lang/perl5.34/Makefile | 2 +- lang/perl5.34/files/patch-hints_freebsd.sh | 43 ++++++++++++++++++++------- lang/perl5.36/Makefile | 1 + lang/perl5.36/files/patch-hints_freebsd.sh | 43 ++++++++++++++++++++------- lang/perl5.38/Makefile | 2 +- lang/perl5.38/files/patch-hints_freebsd.sh | 43 ++++++++++++++++++++------- 10 files changed, 169 insertions(+), 53 deletions(-) diff --git a/lang/perl5-devel/Makefile b/lang/perl5-devel/Makefile index e639fd30f651..cf8cbc3a64c5 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= 2 +PORTREVISION= 3 CATEGORIES= lang devel perl5 # XXX Leave only CPAN. MASTER_SITES= LOCAL/mat/perl \ diff --git a/lang/perl5-devel/files/patch-hints_freebsd.sh b/lang/perl5-devel/files/patch-hints_freebsd.sh index 9907c745ded7..966f04d1262a 100644 --- a/lang/perl5-devel/files/patch-hints_freebsd.sh +++ b/lang/perl5-devel/files/patch-hints_freebsd.sh @@ -1,24 +1,47 @@ Remove libs that are not here on FreeBSD. ---- hints/freebsd.sh.orig 2022-06-19 19:29:35 UTC +--- hints/freebsd.sh.orig 2020-12-18 09:58:48 UTC +++ hints/freebsd.sh -@@ -88,6 +88,8 @@ case "$osvers" in +@@ -88,8 +88,6 @@ 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 / /'` +- # 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 + d_setreuid='define' + d_setegid='define' +@@ -102,8 +100,13 @@ 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 ++libswanted=`echo $libswanted | sed 's/ c / /'` ++# Use -pthread so the compiler adds -lpthread at the right place on the ++# linker command line so its init functions run early. ++libswanted=`echo $libswanted | sed 's/ pthread / /'` + case "$osvers" in + 10.*) +@@ -269,19 +272,6 @@ EOM + + esac + +- case "$osvers" in +- [1-4]*) +- set `echo X "$libswanted "| sed -e 's/ c / c_r /'` +- shift +- libswanted="$*" +- ;; +- *) +- set `echo X "$libswanted "| sed -e 's/ c //'` +- shift +- libswanted="$*" +- ;; +- esac +- + # Configure will probably pick the wrong libc to use for nm scan. + # The safest quick-fix is just to not use nm at all... + usenm=false diff --git a/lang/perl5.32/Makefile b/lang/perl5.32/Makefile index 14e5d6866f52..a56ec53f9005 100644 --- a/lang/perl5.32/Makefile +++ b/lang/perl5.32/Makefile @@ -1,6 +1,6 @@ PORTNAME= perl DISTVERSION= ${PERL_VERSION} -PORTREVISION= 3 +PORTREVISION= 4 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 d8904480b745..966f04d1262a 100644 --- a/lang/perl5.32/files/patch-hints_freebsd.sh +++ b/lang/perl5.32/files/patch-hints_freebsd.sh @@ -2,23 +2,46 @@ Remove libs that are not here on FreeBSD. --- hints/freebsd.sh.orig 2020-12-18 09:58:48 UTC +++ hints/freebsd.sh -@@ -88,6 +88,8 @@ case "$osvers" in +@@ -88,8 +88,6 @@ 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 / /'` +- # 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 + d_setreuid='define' + d_setegid='define' +@@ -102,8 +100,13 @@ 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 ++libswanted=`echo $libswanted | sed 's/ c / /'` ++# Use -pthread so the compiler adds -lpthread at the right place on the ++# linker command line so its init functions run early. ++libswanted=`echo $libswanted | sed 's/ pthread / /'` + case "$osvers" in + 10.*) +@@ -269,19 +272,6 @@ EOM + + esac + +- case "$osvers" in +- [1-4]*) +- set `echo X "$libswanted "| sed -e 's/ c / c_r /'` +- shift +- libswanted="$*" +- ;; +- *) +- set `echo X "$libswanted "| sed -e 's/ c //'` +- shift +- libswanted="$*" +- ;; +- esac +- + # Configure will probably pick the wrong libc to use for nm scan. + # The safest quick-fix is just to not use nm at all... + usenm=false diff --git a/lang/perl5.34/Makefile b/lang/perl5.34/Makefile index 07f18903042c..7f9c6c0f7ce4 100644 --- a/lang/perl5.34/Makefile +++ b/lang/perl5.34/Makefile @@ -1,6 +1,6 @@ PORTNAME= perl DISTVERSION= ${PERL_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN/../../src/5.0 DIST_SUBDIR= perl diff --git a/lang/perl5.34/files/patch-hints_freebsd.sh b/lang/perl5.34/files/patch-hints_freebsd.sh index 4730556d1e89..966f04d1262a 100644 --- a/lang/perl5.34/files/patch-hints_freebsd.sh +++ b/lang/perl5.34/files/patch-hints_freebsd.sh @@ -1,24 +1,47 @@ Remove libs that are not here on FreeBSD. ---- hints/freebsd.sh.orig 2022-02-19 12:15:55 UTC +--- hints/freebsd.sh.orig 2020-12-18 09:58:48 UTC +++ hints/freebsd.sh -@@ -88,6 +88,8 @@ case "$osvers" in +@@ -88,8 +88,6 @@ 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 / /'` +- # 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 + d_setreuid='define' + d_setegid='define' +@@ -102,8 +100,13 @@ 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 ++libswanted=`echo $libswanted | sed 's/ c / /'` ++# Use -pthread so the compiler adds -lpthread at the right place on the ++# linker command line so its init functions run early. ++libswanted=`echo $libswanted | sed 's/ pthread / /'` + case "$osvers" in + 10.*) +@@ -269,19 +272,6 @@ EOM + + esac + +- case "$osvers" in +- [1-4]*) +- set `echo X "$libswanted "| sed -e 's/ c / c_r /'` +- shift +- libswanted="$*" +- ;; +- *) +- set `echo X "$libswanted "| sed -e 's/ c //'` +- shift +- libswanted="$*" +- ;; +- esac +- + # Configure will probably pick the wrong libc to use for nm scan. + # The safest quick-fix is just to not use nm at all... + usenm=false diff --git a/lang/perl5.36/Makefile b/lang/perl5.36/Makefile index 45138ad8dbc3..eacaa878d387 100644 --- a/lang/perl5.36/Makefile +++ b/lang/perl5.36/Makefile @@ -1,5 +1,6 @@ PORTNAME= perl DISTVERSION= ${PERL_VERSION} +PORTREVISION= 1 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN/../../src/5.0 DIST_SUBDIR= perl diff --git a/lang/perl5.36/files/patch-hints_freebsd.sh b/lang/perl5.36/files/patch-hints_freebsd.sh index cf2569284c62..966f04d1262a 100644 --- a/lang/perl5.36/files/patch-hints_freebsd.sh +++ b/lang/perl5.36/files/patch-hints_freebsd.sh @@ -1,24 +1,47 @@ Remove libs that are not here on FreeBSD. ---- hints/freebsd.sh.orig 2020-12-28 16:57:44 UTC +--- hints/freebsd.sh.orig 2020-12-18 09:58:48 UTC +++ hints/freebsd.sh -@@ -88,6 +88,8 @@ case "$osvers" in +@@ -88,8 +88,6 @@ 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 / /'` +- # 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 + d_setreuid='define' + d_setegid='define' +@@ -102,8 +100,13 @@ 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 ++libswanted=`echo $libswanted | sed 's/ c / /'` ++# Use -pthread so the compiler adds -lpthread at the right place on the ++# linker command line so its init functions run early. ++libswanted=`echo $libswanted | sed 's/ pthread / /'` + case "$osvers" in + 10.*) +@@ -269,19 +272,6 @@ EOM + + esac + +- case "$osvers" in +- [1-4]*) +- set `echo X "$libswanted "| sed -e 's/ c / c_r /'` +- shift +- libswanted="$*" +- ;; +- *) +- set `echo X "$libswanted "| sed -e 's/ c //'` +- shift +- libswanted="$*" +- ;; +- esac +- + # Configure will probably pick the wrong libc to use for nm scan. + # The safest quick-fix is just to not use nm at all... + usenm=false diff --git a/lang/perl5.38/Makefile b/lang/perl5.38/Makefile index 572c3299f05f..cf0ea90b5f2e 100644 --- a/lang/perl5.38/Makefile +++ b/lang/perl5.38/Makefile @@ -1,6 +1,6 @@ PORTNAME= perl DISTVERSION= ${PERL_VERSION} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN/../../src/5.0 DIST_SUBDIR= perl diff --git a/lang/perl5.38/files/patch-hints_freebsd.sh b/lang/perl5.38/files/patch-hints_freebsd.sh index 9907c745ded7..966f04d1262a 100644 --- a/lang/perl5.38/files/patch-hints_freebsd.sh +++ b/lang/perl5.38/files/patch-hints_freebsd.sh @@ -1,24 +1,47 @@ Remove libs that are not here on FreeBSD. ---- hints/freebsd.sh.orig 2022-06-19 19:29:35 UTC +--- hints/freebsd.sh.orig 2020-12-18 09:58:48 UTC +++ hints/freebsd.sh -@@ -88,6 +88,8 @@ case "$osvers" in +@@ -88,8 +88,6 @@ 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 / /'` +- # 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 + d_setreuid='define' + d_setegid='define' +@@ -102,8 +100,13 @@ 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 ++libswanted=`echo $libswanted | sed 's/ c / /'` ++# Use -pthread so the compiler adds -lpthread at the right place on the ++# linker command line so its init functions run early. ++libswanted=`echo $libswanted | sed 's/ pthread / /'` + case "$osvers" in + 10.*) +@@ -269,19 +272,6 @@ EOM + + esac + +- case "$osvers" in +- [1-4]*) +- set `echo X "$libswanted "| sed -e 's/ c / c_r /'` +- shift +- libswanted="$*" +- ;; +- *) +- set `echo X "$libswanted "| sed -e 's/ c //'` +- shift +- libswanted="$*" +- ;; +- esac +- + # Configure will probably pick the wrong libc to use for nm scan. + # The safest quick-fix is just to not use nm at all... + usenm=false