summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* toolchain.eclass: don't depend on self if gnat-gplSam James2024-05-131-1/+1
| | | | | | | | | | | | | | | | Without this, we get: ``` * Error: circular dependencies: (sys-devel/gcc-13.2.1_p20240210:13/13::gentoo, ebuild scheduled for merge) depends on (dev-lang/gnat-gpl-2021-r5:10/10::gentoo, ebuild scheduled for merge) (buildtime) (sys-devel/gcc-13.2.1_p20240210:13/13::gentoo, ebuild scheduled for merge) (buildtime) ``` Reported on IRC by dormito. Fixes: 74414ea0c4d70c96bbec234df290d7e5f14d8f51 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix validate_failures.py cp for non-gccSam James2024-05-021-1/+1
| | | | | | | Thanks to matoro for reporting. Fixes: 5e9a0a17e43d3f5d7d7c1e3a8a7e58f8d26861cf Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add another TODO for tests (multilib)Sam James2024-05-011-0/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: update validate_failures.py for Python 3.12Sam James2024-05-011-3/+3
| | | | | | | | | | | | The only change is that we've imported Gabi Falk's patch to fix a SyntaxWarning in its regexes. See https://inbox.sourceware.org/gcc-patches/20240415233833.104460-1-gabifalk@gmx.com/. While here, fix a typo in a comment. Closes: https://bugs.gentoo.org/929834 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add TODO for JITSam James2024-05-011-0/+1
| | | | | | Suggested by Arsen. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: iterate over older slots if test manifest doesn't existSam James2024-05-011-1/+11
| | | | | | | | | | | | | | Iterate over all known slots (at least those using the "new" SLOT value from --with-major-version-only since ~GCC 10 in Gentoo) if we couldn't find a test manifest for GCC_TESTS_COMPARISON_SLOT, rather than expecting pristine results. This makes life easier when installing a new slot (or newly enabling tests for one). It's *particularly* useful, I think, for arch testers who might want to establish a baseline once but not have to keep doing it across many chroots for each new slot. Signed-off-by: Sam James <sam@gentoo.org>
* Building the ada compiler require both c++ and ada USE flags enabled.Alfredo Tupone2024-04-301-1/+1
| | | | | | Otherwise drop ada. Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
* toolchain.eclass: To make "tc_has_feature ada" actually workAlfredo Tupone2024-04-301-1/+1
| | | | | | | tc_has_feature ada is used to add BDEPEND on a ada compiler,. Without setting TC_FEATURES the test does not work Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
* toolchain.eclass: wire up TC_FEATURES for rustSam James2024-04-301-1/+1
| | | | | | | Otherwise we don't actually end up adding a BDEPEND for USE=rust. Closes: https://bugs.gentoo.org/930953 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: propagate USE=zstd to libgccjit buildSam James2024-04-221-1/+1
| | | | | | | | | | | You *can* do LTO with libgccjit, apparently, and it even works if we don't break the compression used for LTO with it. Pass down the zstd arg from USE=zstd like we do for the regular build. Thanks to StrawberryTea for reporting. Closes: https://bugs.gentoo.org/926953 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: depend on virtual/rust for USE=rust (!)Sam James2024-04-181-0/+6
| | | | | | | | This is a temporary measure from upstream commit r14-9968-g3e1e73fc995844. See also https://inbox.sourceware.org/gcc/34fec7ea-8762-4cac-a1c8-ff54e20e31ed@embecosm.com/. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add a variable to force baseline regenerationGabi Falk2024-04-161-8/+25
| | | | | | | Suggested-by: Sam James <sam@gentoo.org> Signed-off-by: Gabi Falk <gabifalk@gmx.com> Closes: https://github.com/gentoo/gentoo/pull/36244 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: always generate a new test-suite baseline manifestGabi Falk2024-04-161-7/+9
| | | | | | | | | | | | | Previously, a new baseline was generated only in cases of test suite success or when GCC_TESTS_IGNORE_NO_BASELINE was enabled. After this change, if there is a test suite regression, users will have the option to copy the new baseline file to the cache if they choose to tolerate the regression. Additionally, the toolchain_pkg_preinst() function will update the baseline automatically if the package is built with the FEATURES=test-fail-continue setting. Signed-off-by: Gabi Falk <gabifalk@gmx.com> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: do not ignore a baseline with GCC_TESTS_IGNORE_NO_BASELINEGabi Falk2024-04-161-1/+1
| | | | | | | | | | The GCC_TESTS_IGNORE_NO_BASELINE flag is intended to facilitate the initial generation of a baseline file, but it shouldn't affect the behavior if a baseline file already exists. Fixes: 1d93a491096f1cc0234fcf44458bfec142c213bb ("toolchain.eclass: rework tests more") Signed-off-by: Gabi Falk <gabifalk@gmx.com> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix installation of gcc[test] packages from binaryGabi Falk2024-04-131-1/+1
| | | | | | | | | Fixes: abf8e2ee55c52c8ae894e0b3845ea1cebfcfd4e8 ("toolchain.eclass: install test results as orphaned files in /var/cache/gcc") Signed-off-by: Gabi Falk <gabifalk@gmx.com> Closes: https://github.com/gentoo/gentoo/pull/36224 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: abort if hybrid CPU detected w/ -march=nativeSam James2024-03-241-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, the previous approach can't work. --param doesn't fully wipe out the previous value added by -march=native, so we still get a failed comparison. Users hitting this should install app-misc/resolve-march-native, run resolve-march-native, and use that in their *FLAGS instead of -march=native - at least for sys-devel/gcc via package.env, if not in make.conf. Therefore, our only real option is to just abort when we detect a problematic situation and tell users what to do. The only other idea I had was to try taskset in src_compile which feels super brittle and not sure it'd even work at all. Thanks to Andrei for testing and debugging with us on IRC & the bug. Bug: https://bugs.gentoo.org/904426 Bug: https://bugs.gentoo.org/908523 Bug: https://bugs.gentoo.org/915389 Bug: https://bugs.gentoo.org/927688 Thanks-to: Andrei Liavonchykau <andreil499@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: improve hybrid checkSam James2024-03-241-2/+2
| | | | | | | | | Thanks to stikonas for debugging on IRC. Bug: https://bugs.gentoo.org/904426 Bug: https://bugs.gentoo.org/908523 Bug: https://bugs.gentoo.org/915389 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fortify hybrid workaroundSam James2024-03-231-1/+2
| | | | | | | | | | | | | * Make sure the result is non-empty before trying to use it as an index * Make sure the result is an integer before trying to use it as an index * Don't try to set --param ... if we had no result at all These are good ideas anyway but they happen with gnat-gpl as apparently older GCC didn't actually have the l1-cache-size thing (I thought it was a bit older than 10). Whatever. Closes: https://bugs.gentoo.org/927646 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: another error handling fixSam James2024-03-231-2/+3
| | | | | Fixes: f81ec884754b3f3d3720d40b212e12ef364821c5 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: another error handling fixSam James2024-03-231-2/+2
| | | | | | | | This one seems to be part of the previous block and was missing a comment / had misleading whitespace. Fixes: f81ec884754b3f3d3720d40b212e12ef364821c5 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: prettify gcc bz linksSam James2024-03-231-8/+8
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: drop stale autoconf 2.13 handlingSam James2024-03-231-10/+0
| | | | | | | | I knew I was meant to do something before pushing the tests branch.. (retry with the extra error handling). Fixes: f81ec884754b3f3d3720d40b212e12ef364821c5 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add various missing error handlingSam James2024-03-231-17/+17
| | | | | | Prompted by Ionen. Signed-off-by: Sam James <sam@gentoo.org>
* Revert "toolchain.eclass: default to just running the (execute) torture tests"Sam James2024-03-231-2/+2
| | | | | | This reverts commit 97b5abe929550453932060bbf078bb4352b400c1. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: default to just running the (execute) torture testsSam James2024-03-231-2/+2
| | | | | | | | | The (execute) torture tests are a nice subset we can run to make sure things aren't totally hosed. Can be overridden by setting GCC_TESTS_CHECK_TARGET=check, GCC_TESTS_RUNTESTFLAGS="". Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: don't install all .sum filesSam James2024-03-231-3/+2
| | | | | | | | | | Just rely on the validate_failures.py manifests instead. These logs get real big real fast. People can save build logs if they want to look at the tests otherwise. Bug: https://bugs.gentoo.org/214345 Bug: https://bugs.gentoo.org/253926 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: rework tests moreSam James2024-03-231-38/+110
| | | | | | | | | | | | | | Rework src_test around contrib/testsuite-management/validate_failures.py in gcc.git. This script is being used by the new Linaro CI effort and it appears well-suited to us, as it allows marking expected failures easily. Followup to 9ac3f1cf62b522236ba9efd7e923071c37df1e6d. Bug: https://bugs.gentoo.org/214345 Bug: https://bugs.gentoo.org/253926 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: install test results as orphaned files in /var/cache/gccSam James2024-03-231-11/+21
| | | | | | | | | | | | This allows comparison across versions even after they get upgraded, which is useful in itself (and across series), but also for looking into when regressions started if they're reported but started a while ago. Followup to 9ac3f1cf62b522236ba9efd7e923071c37df1e6d. Bug: https://bugs.gentoo.org/214345 Bug: https://bugs.gentoo.org/253926 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add CHOST to test data pathSam James2024-03-231-8/+8
| | | | | | | We get collisions for cross-compilers otherwise. Closes: https://bugs.gentoo.org/925037 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: use extglob for hybrid hackSam James2024-03-231-1/+1
| | | | | | Thanks Ionen! Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: split condition for readabilitySam James2024-03-231-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add workaround for hybrid CPUsSam James2024-03-231-0/+18
| | | | | | | | | | | | | | Hybrid/big.little/PE CPUs may report an inconsistent cache size across cores which can cause GCC's bootstrapping to fail its self-comparison. When CBUILD is amd64 or x86 and -march=native is in CFLAGS, iterate over all cores and record l1-cache-size. If any differ, use the first one we found. Bug: https://gcc.gnu.org/PR111768 Closes: https://bugs.gentoo.org/904426 Closes: https://bugs.gentoo.org/908523 Closes: https://bugs.gentoo.org/915389 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix whitespaceSam James2024-03-231-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: More selectively enable cet per archKyle Elbert2024-03-181-1/+1
| | | | | | | | | | | This block enables the x86_64 specific -fcf-protection during bootstrap. Added check to ensure its only enabled there. Bug: https://bugs.gentoo.org/916381 Fixes: b6bf005b843e3d6ee10aa1f088d93c4f89055cc6 Signed-off-by: Kyle Elbert <kcelbert@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35816 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: Make CET auto-apply x86-64 flags also outside hardenedAndreas K. Hüttel2024-03-171-4/+5
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* toolchain.eclass: handle quoted whitespace in EXTRA_ECONFMike Gilbert2024-03-111-1/+2
| | | | | | Code taken from econf in Portage. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* toolchain.eclass: Selectively enable cet options per archAndreas K. Hüttel2024-03-121-4/+2
| | | | | Bug: https://bugs.gentoo.org/916381 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* toolchain.eclass: pass --enable-standard-branch-detection if USE=cetSam James2024-03-111-1/+4
| | | | | | | | | This enables BTI and PAC if supported for arm64. We decided to overload USE=cet to avoid adding yet-another-USE flag to GCC, given it's the same thing. Bug: https://bugs.gentoo.org/916381 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: enable LTO for libgccjit buildSam James2024-03-071-1/+1
| | | | | | | | Note that this is just about LTO support, not building it with LTO. See https://inbox.sourceware.org/jit/dd6f69da-757b-49ba-864a-377a8dc393cf@zoho.com/T/#t. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: allow fixincludes for mingw & special MIPS targetSam James2024-02-231-0/+16
| | | | | | | | | | | | | config/i386/t-cygming always sets STMP_FIXINC regardless of the configure arg for fixincludes, so don't disable it there. The only other case is config/mips/t-sdemtk which I've handled too. Exposed by 0b75d3ce0bae8240c28c6a8f191f5130548f8475. Bug: https://bugs.gentoo.org/905118 Closes: https://bugs.gentoo.org/925204 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: explicitly disable fixincludes for cross tooSam James2024-02-191-2/+2
| | | | | | | Just in case, although the condition is unlikely there now. Bug: https://bugs.gentoo.org/905118 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: rework fixincludes againSam James2024-02-191-3/+20
| | | | | | | | | | | | | | | | | | | | | * Only run fixincludes for >= GCC 13 with <sys-libs/glibc-2.38. * Refactor the logic while at it to make it easier to control (as we do some bits depending on it in src_install). Doing this after getting for cross: ``` The directory (BUILD_SYSTEM_HEADER_DIR) that should contain system headers does not exist: /usr/lib/gcc/aarch64_be-unknown-linux-gnu/14/include make[2]: *** [Makefile:3448: stmp-fixinc] Error 1 make[2]: *** Waiting for unfinished jobs.... ``` This should also let us drop the patch for bug #905118 now. Bug: https://bugs.gentoo.org/905118 Bug: https://gcc.gnu.org/PR107128 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: ignore GCC version mismatch for live ebuildsSam James2024-02-051-1/+1
| | | | | | | | | | | We want to have live ebuilds use e.g. 14.0.9999. not 14.0.1.9999 which is inconsistent and requires a rename/adjustment to package.accept_keywords files when going from stage3->stage4 (.0 -> .1). We can do this now because we use --with-major-version-only nowadays, so SLOT matches the installed path of just '14'. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: don't take shortcut for non-GCC bootstrap compilerSam James2024-02-031-1/+1
| | | | | | | | | We're fragile for stage0 so if we're not building using GCC, use -O0. The use of regular CFLAGS/CXXFLAGS there should be seen as a bonus as it has some caveats. Best to play it safe to avoid confusing hard-to-diagnose differences later on. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: delete libstdc++exp.la tooSam James2024-02-011-0/+1
| | | | | | Reported by negril. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: compress slotted man pages & info pagesSam James2024-01-231-0/+2
| | | | | | | | | | As noted in the bug, we install to a different location to accommodate slotting and hence do not benefit from the automagic compression for /usr/share/doc. Explicitly opt-in for the man pages & info pages we install. Bug: https://bugs.gentoo.org/922729 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: require >=sys-devel/gcc-config-2.11 for portageq fixesSam James2024-01-231-1/+1
| | | | | Bug: https://bugs.gentoo.org/906329 Signed-off-by: Sam James <sam@gentoo.org>
* Move {dev-util → dev-debug}/systemtapMichał Górny2024-01-191-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Move {dev-util → dev-debug}/valgrindMichał Górny2024-01-131-1/+1
| | | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34786 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain.eclass: don't enable PCH by default in IUSE (but effective noop)Sam James2024-01-121-1/+1
| | | | | | It's already masked in use.mask, even. PCH has been proven to be unreliable. Signed-off-by: Sam James <sam@gentoo.org>