mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-20 03:41:02 +02:00
eclass/toolchain: Sync with Gentoo
It's from Gentoo commit e9e6d8c367fdf02b14f9cb2a59489833975d1445. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
576677f440
commit
92561a1f2f
@ -4,7 +4,7 @@
|
|||||||
# @ECLASS: toolchain.eclass
|
# @ECLASS: toolchain.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
# Toolchain Ninjas <toolchain@gentoo.org>
|
# Toolchain Ninjas <toolchain@gentoo.org>
|
||||||
# @SUPPORTED_EAPIS: 7 8
|
# @SUPPORTED_EAPIS: 8
|
||||||
# @BLURB: Common code for sys-devel/gcc ebuilds
|
# @BLURB: Common code for sys-devel/gcc ebuilds
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Common code for sys-devel/gcc ebuilds (and occasionally GCC forks, like
|
# Common code for sys-devel/gcc ebuilds (and occasionally GCC forks, like
|
||||||
@ -17,7 +17,7 @@ _TOOLCHAIN_ECLASS=1
|
|||||||
RUST_OPTIONAL="1"
|
RUST_OPTIONAL="1"
|
||||||
|
|
||||||
case ${EAPI} in
|
case ${EAPI} in
|
||||||
7|8) ;;
|
8) ;;
|
||||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -422,9 +422,9 @@ if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then
|
|||||||
BDEPEND+="
|
BDEPEND+="
|
||||||
ada? (
|
ada? (
|
||||||
|| (
|
|| (
|
||||||
sys-devel/gcc:${SLOT}[ada]
|
|
||||||
<sys-devel/gcc-${SLOT}[ada]
|
<sys-devel/gcc-${SLOT}[ada]
|
||||||
<dev-lang/ada-bootstrap-$((${SLOT} + 1))
|
<dev-lang/ada-bootstrap-$((${SLOT} + 1))
|
||||||
|
sys-devel/gcc:${SLOT}[ada]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@ -432,9 +432,9 @@ if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then
|
|||||||
BDEPEND+="
|
BDEPEND+="
|
||||||
ada? (
|
ada? (
|
||||||
|| (
|
|| (
|
||||||
sys-devel/gcc:${SLOT}[ada]
|
|
||||||
<sys-devel/gcc-${SLOT}[ada]
|
<sys-devel/gcc-${SLOT}[ada]
|
||||||
<dev-lang/ada-bootstrap-${SLOT}
|
<dev-lang/ada-bootstrap-${SLOT}
|
||||||
|
sys-devel/gcc:${SLOT}[ada]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@ -447,7 +447,7 @@ if tc_has_feature d && tc_version_is_at_least 12.0 ; then
|
|||||||
# D in 12+ is self-hosting and needs D to bootstrap.
|
# D in 12+ is self-hosting and needs D to bootstrap.
|
||||||
# TODO: package some binary we can use, like for Ada
|
# TODO: package some binary we can use, like for Ada
|
||||||
# bug #840182
|
# bug #840182
|
||||||
BDEPEND+=" d? ( || ( sys-devel/gcc:${SLOT}[d(-)] <sys-devel/gcc-${SLOT}[d(-)] <sys-devel/gcc-12[d(-)] ) )"
|
BDEPEND+=" d? ( || ( <sys-devel/gcc-${SLOT}[d(-)] <sys-devel/gcc-12[d(-)] sys-devel/gcc:${SLOT}[d(-)] ) )"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if tc_has_feature rust && tc_version_is_at_least 14.1 ; then
|
if tc_has_feature rust && tc_version_is_at_least 14.1 ; then
|
||||||
@ -463,13 +463,8 @@ PDEPEND=">=sys-devel/gcc-config-2.11"
|
|||||||
# @ECLASS_VARIABLE: TOOLCHAIN_PATCH_SUFFIX
|
# @ECLASS_VARIABLE: TOOLCHAIN_PATCH_SUFFIX
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Used to override compression used for for patchsets.
|
# Used to override compression used for for patchsets.
|
||||||
# Default is xz for EAPI 8+ and bz2 for older EAPIs.
|
# Default is xz for EAPI 8+.
|
||||||
if [[ ${EAPI} == 8 ]] ; then
|
|
||||||
: "${TOOLCHAIN_PATCH_SUFFIX:=xz}"
|
: "${TOOLCHAIN_PATCH_SUFFIX:=xz}"
|
||||||
else
|
|
||||||
# Older EAPIs
|
|
||||||
: "${TOOLCHAIN_PATCH_SUFFIX:=bz2}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# @ECLASS_VARIABLE: TOOLCHAIN_SET_S
|
# @ECLASS_VARIABLE: TOOLCHAIN_SET_S
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -766,11 +761,10 @@ do_gcc_gentoo_patches() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local shopt_save=$(shopt -p nullglob)
|
local -
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
einfo "Applying musl patches ..."
|
einfo "Applying musl patches ..."
|
||||||
eapply "${WORKDIR}"/musl/{,nocross/}*.patch
|
eapply "${WORKDIR}"/musl/{,nocross/}*.patch
|
||||||
${shopt_save}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user