summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "toolchain.eclass: add initial sphinx support for 13"Sam James2022-11-231-17/+2
| | | | | | | | | This reverts commit 803ac64d367c4c865a2c30f1196dfec95dc7fee1. This was dropped upstream and no snapshots of GCC 13 in Gentoo use the variables from this commit anymore. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add initial sphinx support for 13Sam James2022-11-141-2/+17
| | | | | | | | | Adds TOOLCHAIN_SPHINX_BUILD. Upstream have converted their docs to Sphinx and it's needed for man, info, and HTML docs. There's no progress yet on including the files in dist tarballs though. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: use xz for gcc-build-logsSam James2022-10-171-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: allow fixincludes for >= GCC 13Sam James2022-10-111-10/+14
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add @DESCRIPTIONSam James2022-10-111-0/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: mention 17.1 profiles explicitly in commentSam James2022-10-091-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: use --with-major-version-only for newer install pathsSam James2022-10-061-1/+36
| | | | | | | | | | | | | | | Flip over to major version install paths to reflect the change in slotting we made between 9 and 10. We only slot major versions now, so we should have our install paths reflect that for: 1. principle of least surprise; 2. we want LDPATH to remain valid between upgrades (bug #865835, bug #873505). Bug: https://bugs.gentoo.org/865835 Bug: https://bugs.gentoo.org/873505 Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/27533 Signed-off-by: Sam James <sam@gentoo.org>
* Revert "toolchain.eclass: allow fixincludes for >= GCC 13"Sam James2022-10-041-14/+10
| | | | | | | | This reverts commit 4505e063f64a7539222d0ccb224f6fa6b1832fc8. Didn't mean to push yet. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: allow fixincludes for >= GCC 13Sam James2022-10-041-10/+14
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Revert "toolchain.eclass: fix building Clang on pure LLVM profiles"Sam James2022-09-171-11/+0
| | | | | | | | This reverts commit 7011340a0f13dcada6f3be48054957035bc6e01a. This ended up being insufficient. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix building Clang on pure LLVM profilesSam James2022-09-171-0/+11
| | | | | | | | | | | | | | | The features/clang profile sets AS="clang -c". 1. We can't use llvm-as because it's essentially for internal use and isn't compatible anyway with cmdline args. 2. "clang -c" doesn't recognise --64 which configure tries to add. So, fake nothing to avoid configure trying to add that in. See: 59d666d032353b054e3cdf4f18ad55e3346e73ca Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: BDEPEND on an Ada compilerSam James2022-09-121-0/+8
| | | | | | | | Necessary but not sufficient. Needs a pkg_setup/pkg_pretend check for whether the active compiler supports Ada still, just like D needs this too (which isn't done either). Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: allow re-generation of info pages for snapshotsSam James2022-09-101-3/+23
| | | | | | | | | | | | | | | | | | Snapshots don't (yet?) contain pre-generated info pages (and man pages, but that's turned out not to be an issue, as they get regenerated and nobody notices). Given it's often easier and more sensible to keyword a snapshot from one of the stable branches upstream rather than cherry-picking patches, we need to make sure we don't regress with the documentation provided when we do that. Allow re-generation of info pages using texinfo for snapshots; we have a safeguard (eqawarn) for if they start appearing in snapshots and nobody noticed. Closes: https://bugs.gentoo.org/834845 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: adjust D dep for non-gccSam James2022-08-311-2/+2
| | | | | | Needed for sys-devel/kgcc64. Signed-off-by: Sam James <sam@gentoo.org>
* Revert "toolchain.eclass: ensure thumb mode for armv6m"Marek Behún2022-08-231-2/+0
| | | | | | | | | | | | | | | | | | This reverts commit 903b71810e0b270a7d494e16e2d799fcd95ae50f. The commit caused default libgcc to be built in thumb mode for armv6m target, but it broke subsequent compilation of newlib via crossdev. The whole reason of this commit was to have the compiler generate correct code when libgcc was used in thumb mode, but now this is not needed anymore, because now we configure gcc with --with-multilib-list=aprofile,rmprofile for CTARGET=arm-* when used with multilib, which generates compiler that builds correct binaries for -march=armv6-m even if libgcc is used. Signed-off-by: Marek Behún <kabel@kernel.org> Closes: https://github.com/gentoo/gentoo/pull/26914 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: build multilibs for ARM's A, R and M architecture profilesMarek Behún2022-08-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For ARM targets, with USE=multilib and with CTARGET that does not imply any of --with-arch, --with-cpu, --with-mode or --with-float options to gcc's configuration (when arm_arch=arm), pass option --with-multilib-list=aprofile,rmprofile to gcc's configuration to make it build multilibs for A, R and M architecture profiles. This makes it possible to have one compiler capable of generating correct code (linking correct libgcc/CRT) for various ARM targets: from armv6 to armv7, for both soft float and half float, for various FPU types. Example of arm-none-eabi-gcc -print-libgcc-file-name output for various options: default: /usr/lib/gcc/arm-none-eabi/12.1.1/libgcc.a -mcpu=cortex-m0 /usr/lib/gcc/arm-none-eabi/12.1.1/thumb/v6-m/nofp/libgcc.a -march=armv7-m /usr/lib/gcc/arm-none-eabi/12.1.1/thumb/v7-m/nofp/libgcc.a -march=armv7-a /usr/lib/gcc/arm-none-eabi/12.1.1/thumb/v7-a/nofp/libgcc.a -march=armv7-a -mhard-float -mfpu=neon /usr/lib/gcc/arm-none-eabi/12.1.1/thumb/v7-a+simd/hard/libgcc.a -march=armv7-a -mhard-float -mfpu=vfp /usr/lib/gcc/arm-none-eabi/12.1.1/thumb/v7-a+fp/hard/libgcc.a Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: extend GCC 12 workaround for older GCCsSam James2022-08-151-1/+1
| | | | | | Needed to build older GCCs with GCC 12. Noticed w/ 9.5.0. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add myself to the devspace URI mappingWANG Xuerui2022-08-071-0/+3
| | | | Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* toolchain.eclass: fix whitespaceSam James2022-07-311-3/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: store previous test results & compare in src_testSam James2022-07-301-2/+42
| | | | | | | | | | | | | | | | | | | | This is what GCC developers do, so let's give it a try. Note that folks will have to (for now?) set GCC_TESTS_IGNORE_NO_BASELINE=1 for it to succeed if src_test failed for the first time & they don't have any test data saved for that slot. The test data is stored in ${EPREFIX}/var/cache/gcc/${SLOT}. GCC upstream's contrib/compare_tests script performs the comparison. We may want to investigate shipping baseline results / gathering them in a repo somewhere. We may also in future want to install this data as orphaned so that it's kept around and not lost when upgrading versions and to allow cross-slot comparison when an old one is depcleaned (although I guess doesn't matter so much if it's first time, but still). Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: workaround build failure for GCC 10 with GCC 12Sam James2022-06-261-0/+6
| | | | | Closes: https://bugs.gentoo.org/849359 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add use-dep default for DSam James2022-06-121-1/+1
| | | | | | The others are masked, but w/e. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: BDEPEND on D for bootstrapping DSam James2022-06-121-0/+7
| | | | | | | | | | To build GCC 12+ w/ D, we need a D compiler. For now, depend on GCC with D enabled. And give a hint to the PM that an older GCC is likely to do the job to break the cycle, as those don't need D to build their D support. Just in newer versions. Closes: https://bugs.gentoo.org/840182 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix comment typoSam James2022-06-071-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix indentationSam James2022-06-071-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: enhance src_test (print summary)Sam James2022-06-071-1/+10
| | | | | | Just like Fedora and opensuse do. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: allow forcefully disabling bootstrapping for developmentSam James2022-06-071-1/+7
| | | | | | | | | | Users should *absolutely not* do this. It's just useful for quickly testing eclass changes. The resultant compiler may not be safe to use. Especially so if unusual flags and environment is used. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: don't force bash in src_compileSam James2022-06-071-2/+7
| | | | | See: 28053845221891a39248b91a0f45781d4414e8c9 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: style cleanups, missing diesSam James2022-06-071-39/+47
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: only force Bash for < GCC 11Sam James2022-06-031-4/+9
| | | | | | | Chosen < 11 just because it's a reasonable enough place to drop, I suspect they're fine though. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix when no TOOLCHAIN_PATCH_DEV is setSam James2022-06-021-6/+8
| | | | | Closes: https://bugs.gentoo.org/849326 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: introduce TOOLCHAIN_PATCH_DEVSam James2022-06-021-3/+31
| | | | | | | | | | | | | | The PMS-legality of trying every entry in SRC_URI is questionable, so let's follow the model we use in some other places like the binutils + glibc ebuilds, and just add a variable for the developer hosting the patchset for an ebuild. We use an array in toolchain.eclass because it's easier. We also fall back to the old behaviour if TOOLCHAIN_PATCH_DEV is not set. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add variable to force fetching patches from gitSam James2022-06-021-15/+37
| | | | | | Useful for pre-release snapshots of a new release series. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fetch patches from git for 9999 ebuildsSam James2022-06-021-3/+20
| | | | | | | | Saves us spinning a new patchset all the time, especially for e.g. 13 which won't have a release for a long time. Suggested-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: change the configure script shebang with BROOTBenda Xu2022-06-011-1/+1
| | | | | | | It executes on CBUILD environment. Signed-off-by: Benda Xu <heroxbd@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: ensure thumb mode for armv6mMarek Behún2022-05-301-0/+2
| | | | | | | | | | | | | | | | | | Currently the eclass ensures thumb mode compilation for libgcc for armv7m targets with [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-} ... [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb ) But libgcc should also be compiled in thumb mode for the armv6m target. Add the dash as is done for the armv7 case so that --with-mode=thumb option is added for armv6m. Signed-off-by: Marek Behún <kabel@kernel.org> Closes: https://github.com/gentoo/gentoo/pull/25687 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add comment above LTO logicSam James2022-05-301-0/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: restore dropped EXTRA_ECONFSam James2022-05-301-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add bootstrap-set build config if USE=cetSam James2022-05-301-2/+13
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: prepend output sync againSam James2022-05-301-1/+1
| | | | | | It's easier for folks to override and the issue I hit was something else. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: misc fixupsSam James2022-05-291-18/+18
| | | | | | | | | | - Revert back to previous MAKEOPTS method which seemed to work better (weird splitting/parsing issue?) - Throw in extra bash like we did before, not just relying on CONFIG_SHELL - Add missing die - Build JIT variant first, then main variant Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: sync outputSam James2022-05-291-0/+5
| | | | | | | | | | Makes the build output far easier to read (GCC has "parallel configure" for a start which is confusing enough) and doesn't slow anything down, although does affect output speed. I've prepended rather than appended to MAKEOPTS to allow override. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: build JIT variant separately to avoid slowdownSam James2022-05-291-16/+65
| | | | | | | | | | | | | It's what GCC upstream recommend to avoid slowing down the main GCC binaries which need to be built w/ -fPIC for JIT. We build twice but do an extremely minimal build for the JIT part which is rather quick. Install the JIT version first, then the main GCC variant, so the overlapping binaries come from the main build => more featureful, correct build options/needed ones for a full GCC build, etc. Closes: https://bugs.gentoo.org/843341 Signed-off-by: Sam James <sam@gentoo.org>
* Revert "toolchain.eclass: build JIT variant separately to avoid slowdown"Sam James2022-05-291-65/+14
| | | | | | | | Let's re-commit this a bit after the nightly snapshot is made. This reverts commit 3910f2d8719d8cb8fbb19572cb524b0472429c81. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: build JIT variant separately to avoid slowdownSam James2022-05-291-14/+65
| | | | | | | | | | | | | It's what GCC upstream recommend to avoid slowing down the main GCC binaries which need to be built w/ -fPIC for JIT. We build twice but do an extremely minimal build for the JIT part which is rather quick. Install the JIT version first, then the main GCC variant, so the overlapping binaries come from the main build => more featureful, correct build options/needed ones for a full GCC build, etc. Closes: https://bugs.gentoo.org/843341 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: drop -j1 for src_installSam James2022-05-271-1/+1
| | | | | | | | | | | | | | | Originates from CVS times (commit hash from git graft): ``` commit 0a4b02d50f2202089927d1526ebe003f54ad55a9 Author: Mike Frysinger <vapier@gentoo.org> Date: Thu Jan 29 06:06:45 2009 +0000 at least gcc-4.1 has problems with parallel installs, so use -j1 with it ``` Doesn't seem relevant in the year 2022 and modern GCCs. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: introduce TOOLCHAIN_PATCH_SUFFIXSam James2022-05-221-11/+15
| | | | | | | | | Apologies for the churn here. It's turned out to be easier to just do this based on EAPI and override in ebuilds if needed. I won't plan to change this again. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: simplify logic for GCC 9Sam James2022-05-221-3/+2
| | | | | | We're not likely to update the patchset again. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: start work on eclassdocsSam James2022-05-131-6/+54
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: followup style tweaksSam James2022-05-131-6/+12
| | | | Signed-off-by: Sam James <sam@gentoo.org>