Skip to content

Commit

Permalink
sys-devel/gcc: import musl mechanisms prepared by sam_ from ::musl ov…
Browse files Browse the repository at this point in the history
…erlay

Signed-off-by: Andreas K. Hüttel <[email protected]>
  • Loading branch information
akhuettel committed Nov 20, 2021
1 parent 6ca028f commit 39ae8d6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
18 changes: 17 additions & 1 deletion eclass/toolchain.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down Expand Up @@ -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}}
Expand All @@ -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} && \
Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 2 additions & 0 deletions sys-devel/gcc/Manifest
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions sys-devel/gcc/gcc-10.3.0-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
EAPI="7"

PATCH_VER="3"
MUSL_VER="1"

inherit toolchain

Expand All @@ -18,4 +19,6 @@ src_prepare() {
fi

toolchain_src_prepare

eapply_user
}
3 changes: 3 additions & 0 deletions sys-devel/gcc/gcc-11.2.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
EAPI="7"

PATCH_VER="1"
MUSL_VER="1"

inherit toolchain

Expand All @@ -19,4 +20,6 @@ src_prepare() {
# bug #803371
eapply "${FILESDIR}"/gcc-11.2.0-cross-compile-include.patch
fi

eapply_user
}

0 comments on commit 39ae8d6

Please sign in to comment.