eclass/toolchain: Sync with Gentoo

It's from Gentoo commit 5e3d413c90ed50a6f9582ee1e3817398d4a82319.
This commit is contained in:
Flatcar Buildbot 2024-01-15 07:13:53 +00:00 committed by Krzesimir Nowak
parent ef7470dc4d
commit 5337553a6d

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain.eclass # @ECLASS: toolchain.eclass
@ -231,7 +231,7 @@ tc_has_feature() {
} }
if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
IUSE+=" debug +cxx +nptl" TC_FEATURES+=( nptl ) IUSE+=" debug +cxx"
IUSE+=" +fortran" TC_FEATURES+=( fortran ) IUSE+=" +fortran" TC_FEATURES+=( fortran )
IUSE+=" doc hardened multilib objc" IUSE+=" doc hardened multilib objc"
IUSE+=" pgo" IUSE+=" pgo"
@ -253,8 +253,7 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
IUSE+=" ada" IUSE+=" ada"
IUSE+=" vtv" IUSE+=" vtv"
IUSE+=" jit" IUSE+=" jit"
tc_version_is_between 5.0 9 && IUSE+=" mpx" IUSE+=" +pie +ssp pch"
IUSE+=" +pie +ssp +pch"
IUSE+=" systemtap" TC_FEATURES+=( systemtap ) IUSE+=" systemtap" TC_FEATURES+=( systemtap )
@ -303,7 +302,7 @@ if tc_has_feature graphite ; then
fi fi
BDEPEND=" BDEPEND="
>=sys-devel/bison-1.875 app-alternatives/yacc
>=sys-devel/flex-2.5.4 >=sys-devel/flex-2.5.4
nls? ( sys-devel/gettext ) nls? ( sys-devel/gettext )
test? ( test? (
@ -338,7 +337,7 @@ if tc_has_feature zstd ; then
fi fi
if tc_has_feature valgrind ; then if tc_has_feature valgrind ; then
BDEPEND+=" valgrind? ( dev-util/valgrind )" BDEPEND+=" valgrind? ( dev-debug/valgrind )"
fi fi
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler # TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
@ -1239,14 +1238,6 @@ toolchain_src_configure() {
confgcc+=( $(use_enable cet) ) confgcc+=( $(use_enable cet) )
fi fi
if in_iuse cilk ; then
confgcc+=( $(use_enable cilk libcilkrts) )
fi
if in_iuse mpx ; then
confgcc+=( $(use_enable mpx libmpx) )
fi
if in_iuse systemtap ; then if in_iuse systemtap ; then
confgcc+=( $(use_enable systemtap) ) confgcc+=( $(use_enable systemtap) )
fi fi
@ -2002,8 +1993,6 @@ toolchain_src_install() {
# libgfortran.la: gfortran itself handles linkage correctly in the # libgfortran.la: gfortran itself handles linkage correctly in the
# dynamic & static case (libgfortran.spec). bug #573302 # dynamic & static case (libgfortran.spec). bug #573302
# libgfortranbegin.la: Same as above, and it's an internal lib. # libgfortranbegin.la: Same as above, and it's an internal lib.
# libmpx.la: gcc itself handles linkage correctly (libmpx.spec).
# libmpxwrappers.la: See above.
# libitm.la: gcc itself handles linkage correctly (libitm.spec). # libitm.la: gcc itself handles linkage correctly (libitm.spec).
# libvtv.la: gcc itself handles linkage correctly. # libvtv.la: gcc itself handles linkage correctly.
# lib*san.la: Sanitizer linkage is handled internally by gcc, and they # lib*san.la: Sanitizer linkage is handled internally by gcc, and they
@ -2020,8 +2009,6 @@ toolchain_src_install() {
-name 'libgomp-plugin-*.la' -o \ -name 'libgomp-plugin-*.la' -o \
-name libgfortran.la -o \ -name libgfortran.la -o \
-name libgfortranbegin.la -o \ -name libgfortranbegin.la -o \
-name libmpx.la -o \
-name libmpxwrappers.la -o \
-name libitm.la -o \ -name libitm.la -o \
-name libvtv.la -o \ -name libvtv.la -o \
-name 'lib*san.la' \ -name 'lib*san.la' \