public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/, eclass/
Date: Sat, 20 Nov 2021 23:15:38 +0000 (UTC)	[thread overview]
Message-ID: <1637450124.39ae8d6b8204cbf27dbf98a41f9f045317ec771c.dilfridge@gentoo> (raw)

commit:     39ae8d6b8204cbf27dbf98a41f9f045317ec771c
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 20 22:15:43 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Nov 20 23:15:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39ae8d6b

sys-devel/gcc: import musl mechanisms prepared by sam_ from ::musl overlay

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 eclass/toolchain.eclass            | 18 +++++++++++++++++-
 sys-devel/gcc/Manifest             |  2 ++
 sys-devel/gcc/gcc-10.3.0-r2.ebuild |  3 +++
 sys-devel/gcc/gcc-11.2.0.ebuild    |  3 +++
 4 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5a272a209361..627531f2765a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -291,7 +291,8 @@ S=$(
 gentoo_urls() {
 	local devspace="HTTP~vapier/dist/URI HTTP~rhill/dist/URI
 	HTTP~zorry/patches/gcc/URI HTTP~blueness/dist/URI
-	HTTP~tamiko/distfiles/URI HTTP~sam/distfiles/URI HTTP~slyfox/distfiles/URI"
+	HTTP~tamiko/distfiles/URI HTTP~sam/distfiles/URI
+	HTTP~sam/distfiles/sys-devel/gcc/URI HTTP~slyfox/distfiles/URI"
 	devspace=${devspace//HTTP/https:\/\/dev.gentoo.org\/}
 	echo mirror://gentoo/$1 ${devspace//URI/$1}
 }
@@ -354,6 +355,7 @@ gentoo_urls() {
 get_gcc_src_uri() {
 	export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}}
 	export UCLIBC_GCC_VER=${UCLIBC_GCC_VER:-${PATCH_GCC_VER}}
+	export MUSL_GCC_VER=${MUSL_GCC_VER:-${PATCH_GCC_VER}}
 	export PIE_GCC_VER=${PIE_GCC_VER:-${GCC_RELEASE_VER}}
 	export HTB_GCC_VER=${HTB_GCC_VER:-${GCC_RELEASE_VER}}
 	export SPECS_GCC_VER=${SPECS_GCC_VER:-${GCC_RELEASE_VER}}
@@ -379,6 +381,8 @@ get_gcc_src_uri() {
 		GCC_SRC_URI+=" $(gentoo_urls gcc-${UCLIBC_GCC_VER}-uclibc-patches-${UCLIBC_VER}.tar.bz2)"
 	[[ -n ${PATCH_VER} ]] && \
 		GCC_SRC_URI+=" $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2)"
+	[[ -n ${MUSL_VER} ]] && \
+		GCC_SRC_URI+=" $(gentoo_urls gcc-${MUSL_GCC_VER}-musl-patches-${MUSL_VER}.tar.bz2)"
 
 	[[ -n ${PIE_VER} ]] && \
 		PIE_CORE=${PIE_CORE:-gcc-${PIE_GCC_VER}-piepatches-v${PIE_VER}.tar.bz2} && \
@@ -547,9 +551,21 @@ do_gcc_gentoo_patches() {
 			tc_apply_patches "Applying Gentoo patches ..." "${WORKDIR}"/patch/*.patch
 			BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}"
 		fi
+
 		if [[ -n ${UCLIBC_VER} ]] ; then
 			tc_apply_patches "Applying uClibc patches ..." "${WORKDIR}"/uclibc/*.patch
 		fi
+
+		if [[ -n ${MUSL_VER} ]] && [[ ${CTARGET} == *musl* ]] ; then
+			if [[ ${CATEGORY} == cross-* ]] ; then
+				# We don't want to apply some patches when cross-compiling.
+				if [[ -d "${WORKDIR}"/musl/nocross ]] ; then
+					rm -fv "${WORKDIR}"/musl/nocross/*.patch || die
+				fi
+			fi
+
+			tc_apply_patches "Applying musl patches ..." "${WORKDIR}"/musl/{,nocross/}*.patch
+		fi
 	fi
 }
 

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index c494b69751eb..98c23de17bf7 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,7 +1,9 @@
 DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e
+DIST gcc-10.3.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384
 DIST gcc-10.3.0-patches-1.tar.bz2 15282 BLAKE2B ef283e8b108af9bfd3324fabb95c835374113c6ff2cf1430a5568b3d1b27183e6de6751367c1e5720c85ac4c45132848888d5510c63f95e88a1f623b6bcf4000 SHA512 6dc435c8619a1532000fae843b9964d0d1e28d3cc9cc1962ab7391570a0cf1135424ea5c0b0d3d5ec5ea863f02e963be2ec4c94822f217fc692a1d808325404e
 DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084
 DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
+DIST gcc-11.2.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384
 DIST gcc-11.2.0-patches-1.tar.bz2 11537 BLAKE2B 9dd791ada244c9b70b8b99f9f305a688c248134715ed1b26d406e53b114983faae6873cdc521497164388d24d5f61c199e98df146bc02f5578e877295bcf5c82 SHA512 6539efc60c656d0798a5896dc1b944ed69914b815102c7a1c10bdba4ef935abd326b01309f38316e121f1ed90ceb2abcaf65df6af116892daad829ac2623cefc
 DIST gcc-11.2.0.tar.xz 80888824 BLAKE2B 69b61234ac436edfea2933df68c434a2ce7aa4454ef4da573e82587e1a42dc420189e949cfdadaf4cb37fc0de9674822210a95b77ff03aca0dbedfe67df19cc6 SHA512 d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf
 DIST gcc-12.0.0-patches-2.tar.bz2 11564 BLAKE2B 5954ee8dd5edb30ecde54275d9ffd4d2f5671de82fe7789688d1220b181fbcdeed3d5305858d8af1fd016e627687ca6f2ebc76bb6b49e9b903e8d63c3de2baea SHA512 6299a1f46fc3f29934db7af20651c0c3e1266bef89b222fc9e3bc6a7e7cd2869301c5b227a4105157456474ae8a626ec550c15971bceb2f844476a9f5bc56284

diff --git a/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
index 18e8535ca87a..0fc4ea78dc7a 100644
--- a/sys-devel/gcc/gcc-10.3.0-r2.ebuild
+++ b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
@@ -4,6 +4,7 @@
 EAPI="7"
 
 PATCH_VER="3"
+MUSL_VER="1"
 
 inherit toolchain
 
@@ -18,4 +19,6 @@ src_prepare() {
 	fi
 
 	toolchain_src_prepare
+
+	eapply_user
 }

diff --git a/sys-devel/gcc/gcc-11.2.0.ebuild b/sys-devel/gcc/gcc-11.2.0.ebuild
index 728de92f4777..3e6511d8432d 100644
--- a/sys-devel/gcc/gcc-11.2.0.ebuild
+++ b/sys-devel/gcc/gcc-11.2.0.ebuild
@@ -4,6 +4,7 @@
 EAPI="7"
 
 PATCH_VER="1"
+MUSL_VER="1"
 
 inherit toolchain
 
@@ -19,4 +20,6 @@ src_prepare() {
 		# bug #803371
 		eapply "${FILESDIR}"/gcc-11.2.0-cross-compile-include.patch
 	fi
+
+	eapply_user
 }


             reply	other threads:[~2021-11-20 23:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20 23:15 Andreas K. Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-19  9:23 [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/, eclass/ Sam James
2024-03-23 15:42 Sam James
2022-05-22 18:41 Sam James
2022-04-21 12:27 Sam James
2020-07-06 16:39 Sergei Trofimovich
2018-05-16 22:02 Sergei Trofimovich
2015-12-19 23:29 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1637450124.39ae8d6b8204cbf27dbf98a41f9f045317ec771c.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox