| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally, when cross compiling only look for a bootstrap gcc that
matches the SLOT that is currently being built since both ada and d
would fail with any other version.
Also correct some CBUILD vs CHOST usage to support cross-compiling ada.
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/39019
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
sourceware was down earlier, so add some mirrors.
sourcehut is an official mirror (albeit an experiment IIRC) by sourceware
and x86-gcc is run by H.J. Lu. gcc-mirror on github (which was in the
list already) looks like an automatic one but let's leave it last.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/945296
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This is what Fedora does and it seems to have fixed the issue I was having
with needing to manually move libgomp.{a,spec} and then after that, getting
undefined references to gomp_nvptx_main (which I assume is because the plugin
wasn't being loaded).
Bug: https://bugs.gentoo.org/945296
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://gcc.gnu.org/PR100431
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
'crossdev -t nvptx-none' creates a standalone cross-compiler which is needed
anyway, but by itself, it's less useful than offloading support within
host gcc, where GCC can choose to offload into that cross-compiler as
appropriate.
This could include amdgcn-amdhsa support in the future.
Bug: https://bugs.gentoo.org/945296
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
We need to handle nvptx* in CTARGET in a few more places so we propagate
that we're using newlib (which is obviously right but also means we don't
then fail when building libatomic b/c libg.a is missing).
Bug: https://bugs.gentoo.org/945296
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Throw an error if the user is trying to build a non-time64 version
of GCC on a system featuring a time64 GCC already. Most of the time,
this will mean that the user has accidentally switched to a non-time64
profile.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/39384
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
-fdiagnostics-set-output=text:experimental-nesting=yes for < 15
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
I need to do some more. Revert my earlier changes for now.
Reverts: 97069fd8721ea55980e548b9cf1d55e2a234a514
Reverts: 0a0b2fe6aadb9d0c3b41fdabb21535659c839bf5
Reverts: 1b5d47858780c700e706582aa370a69148552055
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
Followup followup to 0a0b2fe6aadb9d0c3b41fdabb21535659c839bf5 and
1b5d47858780c700e706582aa370a69148552055.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Followup to 1b5d47858780c700e706582aa370a69148552055.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
Same sort of thing as 434a6775ce93a15ef517478565a938aa73d1d528 although
the paths are different as we're using something from libexec (gnat1).
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
I continue to mix up how tc_version_is_at_least works. One day I'll
change it...
Closes: https://bugs.gentoo.org/944007
Fixes: f6a974f8f2378c6c6a83345c101afce233fdf1d7
Fixes: b923a4c0d1a330e40f0a05f3bc94bb4f32ce1cbb
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Reported by ulm. This was introduced by a last-minute simplification I made,
but USE=libdiagnostics only exists for 9999 and the *next* snapshot, not
the current one, but even then, the code was wrong for < 15 as the use_enable
part was run unconditionally w/ USE=jit.
Fixes: b923a4c0d1a330e40f0a05f3bc94bb4f32ce1cbb
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
See https://gcc.gnu.org/wiki/libdiagnostics. New shared library for
diagnostics in GCC. Also provides the 'sarif-replay' tool.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was seriously mistaken on this: `1 file changed, 2228 deletions(-)` when
testing dropping it.
-g ultimately causes many more matches because of debug statements
and it confuses so many tests.
I must have just made an error when testing other big test flag changes
around the time.
This reverts commit 7200aecb3db3b2dd91129e1530bcb75ce096af91.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
d6cb7a61dad7e9672a8448597835dbbf9b9e0ccf removed the check that passed
--enable-cet or --disable-cet to configure making the script fallback to
automagic. The goal was to prevent passing --enable-cet on x86 gnu
triples as that would lead to gcc failing to build under crossdev. Note
that this specific crossdev cet issue has been solved in crossdev by
package.use.mask'ing the cet USE flag for gcc on x86 but targets
configured before that can still have the cet USE flag enabled.
Bug: https://bugs.gentoo.org/943332
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/39300
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove enable_cet_for 'i[34567]86' 'gnu' 'cet' from to prevent -fcf-protection on x86
systens where CET support will never be fully enabled anyway.
This should help with bug #933772 also but I was unable to reproduce to confirm.
Closes: https://bugs.gentoo.org/943332
Bug: https://bugs.gentoo.org/933772
Thanks-to: Sam James <sam@gentoo.org>
Signed-off-by: Ian Jordan <immoloism@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Like we do for arm64 and amd64, diverge from the upstream check for
linux and only enable it for gnu triples.
Closes: https://bugs.gentoo.org/942951
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/39228
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Followup to 583a1a9ac556d01e1b0df6fe64e67cb646fa4118. Noticed by inspection.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
`RUST_OPTIONAL` is set so that ebuilds must explicitly consume
Rust features.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
|
|
|
|
|
| |
Fixes: d82f81cd65b9a668bd7940151e3fa876d4b0ce92
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
We want to recover logs from that too.
Bug: https://bugs.gentoo.org/942769
Fixes: 5bed0c77a1c54ac9297db4bb54af2e45c0558ec7
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Acked-by: Sam James <sam@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Same as 72d5ea56d41b7d5aac351854b7479f5c2c430c83, the flag got renamed.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://gcc.gnu.org/PR116975
Closes: https://bugs.gentoo.org/940750
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
This is an experimental flag not yet merged upstream but filtering
it makes it easier to test with so it doesn't confuse older unpatched (locally)
GCCs.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
When cross compiling sys-devel/gcc[d] one would need
cross-${CHOST}/gcc[d] installed. We can't enforce this dependency so
defer to printing an error message if it can't be found prompting the
user to install the package.
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/38894
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
<=gcc-11 doesn't need another gdc to build so don't search for one
during the setup.
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the D use flags is masked by crossdev the build used to work, on
my limited number of machines, up until recently with the D code
refactors.
When building sys-devel/gcc or cross-${TARGET}/gcc natively the
appropriate gdc compiler is installed under /usr/${CHOST}/gcc-bin and is
provided by sys-devel/gcc[d].
When building sys-devel/gcc or cross-${CTARGET}/gcc for another system
the appropriate gdc binary is under /usr/${CBUILD}/${CHOST}/gcc-bin and
is provided by cross-${CHOST}/gcc[d].
Also use the full ${CHOST}-gdc executable names since plain gdc is only
present on native builds.
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sys-devel/gcc[d] uses GDCFLAGS when compiling the D parts. GDCFLAGS is
also used by ::dlang in a similar manner. The overlay suggests putting
in the variable similar values to CFLAGS so it's possible that it will
contain -march=native.
Because of this, add GDCFLAGS to the list of *FLAGS that are reset to
something that is understood by both the build and the host system when
cross-compiling.
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We sometimes have people surprised by the behaviour with USE=-debug for
unreleased versions of GCC.
For more detail on that & context, see:
* 564b130fd1bc8a35ac4d673d5211654c49af3fda
* 85db50a7c626a1844c8eb2d03051c8c5d320c205
* 3f9a5248fb796417d63ae1c1234b534a88f22f14
Add some ewarns to explain the situation to users so they understand
their options and also don't wrongly think GCC will be slow when released.
Bug: https://bugs.gentoo.org/904481
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
I didn't notice as I tested on a machine with ${SLOT} available.
Fixes: c9f79ed713758a95abea32d9c41f4f2a49f999b2
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This improves upon the strategy from 9bb87839a6ad66ee7c89837a546fbf2e7f69b577
and d1aa56b6e39f07490021e594920f4a965a968c07.
Earlier, I saw building GCC 15's gdc fail w/ bootstrap from 10, even
though we had 11/12/13/14 installed.
The new logic is as follows, with descending order of preference:
1) Match the version being built;
2) Iterate downwards from the version being built;
3) Iterate upwards from the version being built to the greatest version installed.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
e.g. if gnat1 from a bootstrap compiler is older than the host compiler
itself, we are going to end up passing flags that the host compiler does
understand, but gnat1 does not. This is trivially broken with
-march=native (passes loads of flags) and also more plebeian things such
as -march=x86-64-v3 which is sadly too new for gnat-10
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Since commit a9156e205ca667cf40f43329b5bc22749f166501 we pass CXXFLAGS
as well, but it didn't include the existing logic we have for checking if
you have a really old compiler and taking precautions to avoid garbage
codegen breaking the stage1 compiler.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need a bootstrap (version) and a bootstrap_type (value irrelevant for
now except to flag whether it is ada-bootstrap).
Due to a typo, we set the former first to the detected slot and then
immediately to the value "gcc", which made no sense since "gcc" isn't a
valid SLOT version of gcc. Hence we tried to run ${triplet}-gcc-gcc
instead of running ${triplet}-gcc-${SLOT}.
Only reproducible when using gnat-gpl itself as the gcc edition.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
... ditto for -Wno-format-security and so on. It causes far more noise
than test cases it helps with. Of course, when we have -Wno-complain-wrong-lang
available (in >= GCC 13), then it's worth it.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The gnat* tools don't understand --specs=* and we only need to do that
to ensure the compiler driver (gcc) calls the right things anyway.
What we might have to do in future however is force --gcc and --link...
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On arches that support USE=cet (those being amd64, arm64, and, x86)
always pass --enable-cet or --disable-cet (or aarch64
standard-branch-protection equivalent) to prevent any configure automagic
from happening.
Preserve the same CTARGET logic so only pass --enable-cet if the
target environment supports it and if `use cet`.
Also fix the regex `i[[34567]]86` as that matches an i, followed by any
of the digits from 3 to 7 or the [ character, followed by ], followed by
8, followed by 6. The regex originated in config/cet.m4 which uses []
for quotes.
The automatic specifically breaks gcc[d] on musl because it prevents the
code from using an internal assembly implementation for a function and
deferring to using an implementation that would be provided by
sys-libs/libucontext which results in undefined symbol errors:
```
/usr/lib/gcc/x86_64-pc-linux-musl/11/../../../../x86_64-pc-linux-musl/bin/ld:
/usr/lib/gcc/x86_64-pc-linux-musl/11/libgphobos.a(fiber.o): in function `_D4core6thread5fiber5Fiber9initStackMFNbNiZv':
(.text._D4core6thread5fiber5Fiber9initStackMFNbNiZv+0x2e): undefined reference to `getcontext'
/usr/lib/gcc/x86_64-pc-linux-musl/11/../../../../x86_64-pc-linux-musl/bin/ld: (.text._D4core6thread5fiber5Fiber9initStackMFNbNiZv+0x5f): undefined reference to `makecontext'
/usr/lib/gcc/x86_64-pc-linux-musl/11/../../../../x86_64-pc-linux-musl/bin/ld: /usr/lib/gcc/x86_64-pc-linux-musl/11/libgphobos.a(fiber.o): in function `_D4core6thread5fiber5Fiber12_staticCtor1FZv':
(.text._D4core6thread5fiber5Fiber12_staticCtor1FZv+0x1c): undefined reference to `getcontext'
```
Bug: https://bugs.gentoo.org/939874
Closes: https://bugs.gentoo.org/918692
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/38830
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
This should work now that we install gcc-config-style symlinks in
ada-bootstrap.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
* Don't try to do a PATH lookup for the wrappers for now; need to install
more symlinks in ada-bootstrap, I think
* Style tweaks
Signed-off-by: Sam James <sam@gentoo.org>
|