summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-19 12:11:50 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-19 12:11:50 +0100
commitfe0961fc9674dd24a017f474a34c1edbbd005965 (patch)
treedfdf05888e0f5fff9c1faafe6eb0dd5d827b63e5 /eclass
parentbcd00c826070701606b0ccebf46234dfc792d3e9 (diff)
gentoo auto-resync : 19:09:2024 - 12:11:50
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39895 -> 39891 bytes
-rw-r--r--eclass/guile.eclass3
-rwxr-xr-xeclass/tests/toolchain.sh17
-rw-r--r--eclass/toolchain.eclass22
4 files changed, 18 insertions, 24 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index fbe371003aac..25d69b5a9ced 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/guile.eclass b/eclass/guile.eclass
index 9310cd060da9..323d04ef1152 100644
--- a/eclass/guile.eclass
+++ b/eclass/guile.eclass
@@ -190,8 +190,9 @@ _guile_multibuild_wrapper() {
local -x SLOTTED_ED="${SLOTTED_D}${EPREFIX}/"
local -x GUILE_EFFECTIVE_VERSION="${GUILE_CURRENT_VERSION}"
mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
"$@"
+ popd >/dev/null || die
}
# @VARIABLE: SLOTTED_D
diff --git a/eclass/tests/toolchain.sh b/eclass/tests/toolchain.sh
index 6f8df5b4fc4a..1ba2e6b1f29d 100755
--- a/eclass/tests/toolchain.sh
+++ b/eclass/tests/toolchain.sh
@@ -49,10 +49,6 @@ test_downgrade_arch_flags 4.5 "-march=core2" "-march=haswell"
test_downgrade_arch_flags 4.4 "-march=core2" "-march=haswell"
test_downgrade_arch_flags 4.3 "-march=core2" "-march=haswell"
test_downgrade_arch_flags 4.2 "-march=nocona" "-march=haswell"
-test_downgrade_arch_flags 4.1 "-march=nocona" "-march=haswell"
-test_downgrade_arch_flags 4.0 "-march=nocona" "-march=haswell"
-test_downgrade_arch_flags 3.4 "-march=nocona" "-march=haswell"
-test_downgrade_arch_flags 3.3 "-march=nocona" "-march=haswell"
test_downgrade_arch_flags 4.9 "-march=bdver4" "-march=bdver4"
test_downgrade_arch_flags 4.8 "-march=bdver3" "-march=bdver4"
@@ -62,31 +58,18 @@ test_downgrade_arch_flags 4.5 "-march=amdfam10" "-march=bdver4"
test_downgrade_arch_flags 4.4 "-march=amdfam10" "-march=bdver4"
test_downgrade_arch_flags 4.3 "-march=amdfam10" "-march=bdver4"
test_downgrade_arch_flags 4.2 "-march=k8" "-march=bdver4"
-test_downgrade_arch_flags 4.1 "-march=k8" "-march=bdver4"
-test_downgrade_arch_flags 4.0 "-march=k8" "-march=bdver4"
-test_downgrade_arch_flags 3.4 "-march=k8" "-march=bdver4"
-test_downgrade_arch_flags 3.3 "-march=x86-64" "-march=bdver4"
-
-test_downgrade_arch_flags 3.4 "-march=c3-2" "-march=c3-2"
-test_downgrade_arch_flags 3.3 "-march=c3" "-march=c3-2"
test_downgrade_arch_flags 4.5 "-march=garbage" "-march=garbage"
test_downgrade_arch_flags 10 "-mtune=intel" "-mtune=intel"
test_downgrade_arch_flags 4.9 "-mtune=intel" "-mtune=intel"
test_downgrade_arch_flags 4.8 "-mtune=generic" "-mtune=intel"
-test_downgrade_arch_flags 3.4 "" "-mtune=generic"
-test_downgrade_arch_flags 3.4 "" "-mtune=x86-64"
-test_downgrade_arch_flags 3.3 "" "-mtune=anything"
test_downgrade_arch_flags 4.5 "-march=amdfam10 -mtune=generic" "-march=btver2 -mtune=generic"
-test_downgrade_arch_flags 3.3 "-march=k6-2" "-march=geode -mtune=barcelona"
-test_downgrade_arch_flags 3.4 "-march=k8" "-march=btver2 -mtune=generic"
test_downgrade_arch_flags 10 "-march=native" "-march=native"
test_downgrade_arch_flags 8 "-march=znver1" "-march=znver2"
test_downgrade_arch_flags 4.2 "-march=native" "-march=native"
-test_downgrade_arch_flags 4.1 "-march=nocona" "-march=native"
test_downgrade_arch_flags 9 "-march=znver2" "-march=znver3"
test_downgrade_arch_flags 10 "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1"
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index c03312be43ad..a545f730ada7 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -22,7 +22,9 @@ _TOOLCHAIN_ECLASS=1
DESCRIPTION="The GNU Compiler Collection"
HOMEPAGE="https://gcc.gnu.org/"
-inherit edo flag-o-matic gnuconfig libtool multilib pax-utils python-any-r1 toolchain-funcs prefix
+inherit edo flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
+
+[[ -n ${TOOLCHAIN_HAS_TESTS} ]] && inherit python-any-r1
tc_is_live() {
[[ ${PV} == *9999* ]]
@@ -143,6 +145,12 @@ tc_version_is_between() {
# @DESCRIPTION:
# Indicate the developer who hosts the patchset for an ebuild.
+# @ECLASS_VARIABLE: TOOLCHAIN_HAS_TESTS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Controls whether python-any-r1 is inherited and validate_failures.py
+# is used.
+
# @ECLASS_VARIABLE: GCC_PV
# @INTERNAL
# @DESCRIPTION:
@@ -273,6 +281,7 @@ STDCXX_INCDIR=${TOOLCHAIN_STDCXX_INCDIR:-${LIBPATH}/include/g++-v${GCC_BRANCH_VE
LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+"
IUSE="test vanilla +nls"
RESTRICT="!test? ( test )"
+[[ -z ${TOOLCHAIN_HAS_TESTS} ]] && RESTRICT+=" test"
TC_FEATURES=()
@@ -537,7 +546,8 @@ get_gcc_src_uri() {
[[ -n ${MUSL_VER} ]] && \
GCC_SRC_URI+=" $(gentoo_urls gcc-${MUSL_GCC_VER}-musl-patches-${MUSL_VER}.tar.${TOOLCHAIN_PATCH_SUFFIX})"
- GCC_SRC_URI+=" test? ( https://gitweb.gentoo.org/proj/gcc-patches.git/plain/scripts/testsuite-management/validate_failures.py?id=${GCC_VALIDATE_FAILURES_VERSION} -> gcc-validate-failures-${GCC_VALIDATE_FAILURES_VERSION}.py )"
+ [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && \
+ GCC_SRC_URI+=" test? ( https://gitweb.gentoo.org/proj/gcc-patches.git/plain/scripts/testsuite-management/validate_failures.py?id=${GCC_VALIDATE_FAILURES_VERSION} -> gcc-validate-failures-${GCC_VALIDATE_FAILURES_VERSION}.py )"
echo "${GCC_SRC_URI}"
}
@@ -569,7 +579,7 @@ toolchain_pkg_setup() {
# more legible.
MAKEOPTS="--output-sync=line ${MAKEOPTS}"
- use test && python-any-r1_pkg_setup
+ [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && use test && python-any-r1_pkg_setup
}
#---->> src_unpack <<----
@@ -633,7 +643,7 @@ toolchain_src_prepare() {
tc_enable_hardened_gcc
fi
- if use test ; then
+ if [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && use test ; then
cp "${DISTDIR}"/gcc-validate-failures-${GCC_VALIDATE_FAILURES_VERSION}.py "${T}"/validate_failures.py || die
chmod +x "${T}"/validate_failures.py || die
fi
@@ -2275,7 +2285,7 @@ toolchain_src_install() {
pax-mark -r "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1"
pax-mark -r "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus"
- if use test ; then
+ if [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && use test ; then
mkdir "${T}"/test-results || die
cd "${WORKDIR}"/build || die
find . -name \*.sum -exec cp --parents -v {} "${T}"/test-results \; || die
@@ -2434,7 +2444,7 @@ create_revdep_rebuild_entry() {
#---->> pkg_pre* <<----
toolchain_pkg_preinst() {
- if [[ ${MERGE_TYPE} != binary ]] && use test ; then
+ if [[ -n ${TOOLCHAIN_HAS_TESTS} && ${MERGE_TYPE} != binary ]] && use test ; then
# Install as orphaned to allow comparison across more versions even
# after unmerged. Also useful for historical records and tracking
# down regressions a while after they first appeared, but were only