summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* toolchain.eclass: Don't inherit eutilsUlrich Müller2023-06-161-3/+0
| | | | | | | None of the ebuilds inheriting toolchain in EAPI 7 needs any of the remaining eutils features. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* toolchain.eclass: support --enable-host-pie for GCC 14Sam James2023-06-161-0/+4
| | | | | | See also https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f9de5c24b9a6172d48786289035eed8f947c04c1. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: cleanup < GCC 8 debrisSam James2023-06-101-551/+89
| | | | | | | | If you need this, please use toolchain-legacy.eclass from the ::toolchain repository. Closes: https://github.com/gentoo/gentoo/pull/31362 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: cleanup TOOLCHAIN_SET_SSam James2023-06-031-9/+11
| | | | | | No need for a subshell. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: drop legacy cygwin cruftSam James2023-06-031-33/+0
| | | | | | Cygwin supported already dropped from Prefix and the rest of the tree. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add links/info about USE=rust for gcc-13Sam James2023-05-191-0/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: return to using -j1 for make installSam James2023-05-191-2/+12
| | | | | | | | | | | | | | | | Unfortunately, we have to use -j1 for make install. Upstream don't really test it and there's not much appetite for fixing bugs with it. Several reported bugs exist where the resulting image was wrong, rather than a simple compile/install failure: This reverts commit db0387530cf744068f480b68a192d4fc10a81286. Closes: https://bugs.gentoo.org/906155 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42980 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51814 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103656 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109898 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: filter-lto too (please use USE=lto instead)Sam James2023-05-091-0/+3
| | | | | | | Followup to e6dd349ea37663f3e3a6ce1df3fd9f7cf18e20cd. Closes: https://bugs.gentoo.org/906007 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: cleanup obsolete texinfo hacksSam James2023-05-081-30/+6
| | | | | | | | | | | | | | | | | These don't seem to be necessary at all now: - we don't sed info pages anymore because GCC has support for setting the bug URL + distributor now - there's info pages in other directories than gcc/ (e.g. libgccjit) With 12.3.0, I had without this: ``` * CMP: =sys-devel/gcc-12.2.1_p20230505 with sys-devel/gcc-12.3.0/image * FILES:-usr/share/gcc-data/x86_64-pc-linux-gnu/12/info/gfortran.info * FILES:-usr/share/gcc-data/x86_64-pc-linux-gnu/12/info/libgccjit.info * ------> FILES(-2) ABI(TIMEOUT) ``` Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: conditionalize old awk sed fixupSam James2023-05-081-1/+4
| | | | | | Bug: https://bugs.gentoo.org/215828 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35855 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: record EGIT_VERSION correctly in gcc --version for live ↵Sam James2023-04-271-0/+5
| | | | | | | | | | | | ebuilds Without this, gcc --version ends up only showing the commit resulting from applying our patches on top. With this fixed, gcc --version shows both the upstream commit & the commit hash after applying patches. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: don't enable openmp by default for >= 13Sam James2023-04-261-1/+8
| | | | | | | This should be set in profiles going forward, not in toolchain.eclass. Bug: https://bugs.gentoo.org/890999 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: wire up modula-2 frontend support for GCC 13; disable Rust ↵Sam James2023-04-181-1/+8
| | | | | | | | | | | | for 13 - Wire up modula-2 frontend support for GCC 13 as USE=modula2 - Drop Rust for GCC 13, upstream are going to make it fatal for configure for 13.1, but may revisit for 13.2 (not sure how likely that is, though, it depends on how much ends up backported). Rust will be available for GCC 14 though. We will revisit if changes occur, of course. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: pass improved checking for USE=debug for pre-releases tooSam James2023-04-131-8/+14
| | | | | | Followup to 85db50a7c626a1844c8eb2d03051c8c5d320c205. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: enhance USE=debug for more checkingSam James2023-04-131-1/+4
| | | | | | | | | | | We now do --enable-checking=yes,extra,rtl after discussion in #gcc for USE=debug. If rtl is too slow, we can do just yes,etra. We've actually found yet another bug with our general change for snapshots to start using checking, too: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109506. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: use upstream default checking for pre/non-released compilersSam James2023-04-101-3/+6
| | | | | | | | | | | | | | Note that this only affects actually-non-released compilers like GCC 13 at this point in time and *not* snapshots from the stable branches. Upstream default to more checking (asserts/runtime integrity checks) when 'gcc/DEV-PHASE' contains 'experimental'. Copy that and defer to the configure.ac default when it does. The practical upshot of this is that we go from --enable-checking=release for GCC 13 to --enable-checking=yes,extra. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix spellingSam James2023-03-261-5/+5
| | | | | | | Thanks to codespell. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* toolchain.eclass: Quote argument of ":" commandUlrich Müller2023-03-261-8/+8
| | | | | | This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* toolchain.eclass: use mirror://gcc first, then fallback to mirror://gnuSam James2023-03-251-3/+9
| | | | | | | | | mirror://gnu doesn't always have snapshots, but mirror://gcc do. See https://gcc.gnu.org/mirrors.html. Needed because of the ongoing gnu.org DNS and availability issues. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: swap LTO order to allow overrideSam James2023-03-211-8/+8
| | | | | | | Otherwise we can't disable it for some targets. Followup to 970f09a488afafe27152255d4343ff59acc94415. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: disable LTO for nvptx-none targetSam James2023-03-211-0/+4
| | | | | | It doesn't support LTO and fails in stage1 crossdev. Signed-off-by: Sam James <sam@gentoo.org>
* eclass: standardize prologue/epilogueDavid Seifert2023-03-171-6/+5
| | | | | Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
* toolchain.eclass: Register the D tc_featureArsen Arsenović2023-02-091-2/+2
| | | | | | | This behavior is relied on elsewhere, for setting BDEPENDs correctly. Fixes: a39d1669ca0f4 ("toolchain.eclass: adjust D dep for non-gcc") Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
* toolchain.eclass: Move remaining gcc prefix tweaks from profileJames Le Cuirot2023-01-281-0/+13
| | | | Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* toolchain.eclass: Fix cross-compiling gcc for standalone prefixJames Le Cuirot2023-01-281-0/+15
| | | | | | | | | | | | | | | | Standalone prefix has always configured gcc with a sysroot, but the location of this sysroot is different at build time when cross-compiling. gcc has a separate configure option for that. prefix-guest systems do not have a sysroot applied, as they use the host's libc. Move this code from the prefix profile into the eclass so that it's less of a special case. We can avoid relying on the `BOOTSTRAP_RAP_STAGE2` variable by checking for the `prefix-guest` USE flag instead, as a prefix-guest profile is now used for RAP stage 2. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* toolchain.eclass: prepare for USE=hardened => FORTIFY_SOURCE=3, assertionsSam James2022-12-311-0/+4
| | | | | | | | | | | | USE=hardened will now imply: - default -D_FORTIFY_SOURCE=3 (instead of 2 for normal profiles) - default -D_GLIBCXX_ASSERTIONS Bug: https://bugs.gentoo.org/876895 Bug: https://bugs.gentoo.org/884417 Bug: https://bugs.gentoo.org/847148 Bug: https://bugs.gentoo.org/876893 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add USE=rust for GCC 13.0.9999Sam James2022-12-131-2/+8
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix default-* addition for new GCC 12 snapshotSam James2022-12-051-2/+2
| | | | | Fixes: adf44514cf590a860b3140efae31187854cf8cea Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: allow default-znow, default-stack-clash-protection for ↵Sam James2022-12-051-2/+2
| | | | | | | | 12.2.1_p20221203 Bug: https://bugs.gentoo.org/675050 Bug: https://bugs.gentoo.org/876923 Signed-off-by: Sam James <sam@gentoo.org>
* eclass/toolchain.eclass: add USE=ieee-long-double for sys-devel/gccGeorgy Yakovlev2022-12-041-0/+8
| | | | | Bug: https://bugs.gentoo.org/882815 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
* toolchain.eclass: restore style changes lost in GCC 13 sphinx revertSam James2022-11-301-2/+4
| | | | | Fixes: 476e425a52e834eb067f44c98a8c1faefdef260b Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix comment typoSam James2022-11-301-1/+1
| | | | | | Noticed by Arfrever. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: Split -z now and -fstack-clash-protection out for gcc13Andreas K. Hüttel2022-11-291-1/+13
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* 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>