From 752d6256e5204b958b0ef7905675a940b5e9172f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 12 May 2022 16:42:50 +0300 Subject: gentoo resync : 12.05.2022 --- eclass/toolchain.eclass | 58 +++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 21 deletions(-) (limited to 'eclass/toolchain.eclass') diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 8788e72efebb..1bbacfa2bdb4 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -83,15 +83,18 @@ GCCMICRO=$(ver_cut 3 ${GCC_PV}) # Ideally this variable should allow for custom gentoo versioning # of binary and gcc-config names not directly tied to upstream -# versioning. In practive it's hard to untangle from gcc/BASE-VER +# versioning. In practice it's hard to untangle from gcc/BASE-VER # (GCC_RELEASE_VER) value. GCC_CONFIG_VER=${GCC_RELEASE_VER} # Pre-release support. Versioning schema: # 1.0.0_pre9999: live ebuild -# 1.2.3_pYYYYMMDD: weekly snapshots +# 1.2.3_pYYYYMMDD (or 1.2.3_preYYYYMMDD for unreleased major versions): weekly snapshots # 1.2.3_rcYYYYMMDD: release candidates -if [[ ${GCC_PV} == *_p* ]] ; then +if [[ ${GCC_PV} == *_pre* ]] ; then + # weekly snapshots + SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_pre} +elif [[ ${GCC_PV} == *_p* ]] ; then # weekly snapshots SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_p} elif [[ ${GCC_PV} == *_rc* ]] ; then @@ -241,7 +244,7 @@ fi if tc_has_feature sanitize ; then # libsanitizer relies on 'crypt.h' to be present # on target. glibc user to provide it unconditionally. - # Nowadays it's a standalone library: #802648 + # Nowadays it's a standalone library: bug #802648 DEPEND+=" sanitize? ( virtual/libcrypt )" fi @@ -251,7 +254,8 @@ if tc_has_feature systemtap ; then fi if tc_has_feature zstd ; then - DEPEND+=" zstd? ( app-arch/zstd )" + DEPEND+=" zstd? ( app-arch/zstd:= )" + RDEPEND+=" zstd? ( app-arch/zstd:= )" fi if tc_has_feature valgrind; then @@ -262,17 +266,21 @@ PDEPEND=">=sys-devel/gcc-config-2.3" #---->> S + SRC_URI essentials <<---- +: ${TOOLCHAIN_SET_S:=yes} + # Set the source directory depending on whether we're using # a live git tree, snapshot, or release tarball. -S=$( - if tc_is_live ; then - echo ${EGIT_CHECKOUT_DIR} - elif [[ -n ${SNAPSHOT} ]] ; then - echo ${WORKDIR}/gcc-${SNAPSHOT} - else - echo ${WORKDIR}/gcc-${GCC_RELEASE_VER} - fi -) +if [[ ${TOOLCHAIN_SET_S} == yes ]] ; then + S=$( + if tc_is_live ; then + echo ${EGIT_CHECKOUT_DIR} + elif [[ -n ${SNAPSHOT} ]] ; then + echo ${WORKDIR}/gcc-${SNAPSHOT} + else + echo ${WORKDIR}/gcc-${GCC_RELEASE_VER} + fi + ) +fi gentoo_urls() { local devspace=" @@ -309,7 +317,7 @@ gentoo_urls() { # PATCH_GCC_VER # This should be set to the version of the gentoo patch tarball. # The resulting filename of this tarball will be: -# gcc-${PATCH_GCC_VER:-${GCC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2 +# gcc-${PATCH_GCC_VER:-${GCC_RELEASE_VER}}-patches-${PATCH_VER}.tar.xz # # PIE_VER # PIE_GCC_VER @@ -321,7 +329,7 @@ gentoo_urls() { # PIE_VER="8.7.6.5" # PIE_GCC_VER="3.4.0" # The resulting filename of this tarball will be: -# gcc-${PIE_GCC_VER:-${GCC_RELEASE_VER}}-piepatches-v${PIE_VER}.tar.bz2 +# gcc-${PIE_GCC_VER:-${GCC_RELEASE_VER}}-piepatches-v${PIE_VER}.tar.xz # # SPECS_VER # SPECS_GCC_VER @@ -333,7 +341,7 @@ gentoo_urls() { # SPECS_VER="8.7.6.5" # SPECS_GCC_VER="3.4.0" # The resulting filename of this tarball will be: -# gcc-${SPECS_GCC_VER:-${GCC_RELEASE_VER}}-specs-${SPECS_VER}.tar.bz2 +# gcc-${SPECS_GCC_VER:-${GCC_RELEASE_VER}}-specs-${SPECS_VER}.tar.xz # # CYGWINPORTS_GITREV # If set, this variable signals that we should apply additional patches @@ -366,18 +374,26 @@ get_gcc_src_uri() { fi fi + local PATCH_SUFFIX="xz" + if ! tc_version_is_at_least 9.4.1_p20220317 || tc_version_is_between 9 9.5 \ + || tc_version_is_between 10 10.4 || tc_version_is_between 11 11.4 \ + || tc_version_is_between 12 12.0.1_pre20220424 ; then + # These are versions before we started to use .xz + PATCH_SUFFIX="bz2" + fi + [[ -n ${PATCH_VER} ]] && \ - GCC_SRC_URI+=" $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2)" + GCC_SRC_URI+=" $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.${PATCH_SUFFIX})" [[ -n ${MUSL_VER} ]] && \ - GCC_SRC_URI+=" $(gentoo_urls gcc-${MUSL_GCC_VER}-musl-patches-${MUSL_VER}.tar.bz2)" + GCC_SRC_URI+=" $(gentoo_urls gcc-${MUSL_GCC_VER}-musl-patches-${MUSL_VER}.tar.${PATCH_SUFFIX})" [[ -n ${PIE_VER} ]] && \ - PIE_CORE=${PIE_CORE:-gcc-${PIE_GCC_VER}-piepatches-v${PIE_VER}.tar.bz2} && \ + PIE_CORE=${PIE_CORE:-gcc-${PIE_GCC_VER}-piepatches-v${PIE_VER}.tar.${PATCH_SUFFIX}} && \ GCC_SRC_URI+=" $(gentoo_urls ${PIE_CORE})" # gcc minispec for the hardened gcc 4 compiler [[ -n ${SPECS_VER} ]] && \ - GCC_SRC_URI+=" $(gentoo_urls gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2)" + GCC_SRC_URI+=" $(gentoo_urls gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.${PATCH_SUFFIX})" if tc_has_feature gcj ; then if tc_version_is_at_least 4.5 ; then -- cgit v1.2.3