Without this, we can end up with something like:
```
[ebuild NS ] sys-devel/gcc-11.5.0:11::gentoo [13.3.1_p20240614:13::gentoo] USE="(ada*) cet (cxx) (d*) [...]"
[ebuild R ] sys-devel/gcc-13.3.1_p20240614:13::gentoo USE="(ada*) cet (cxx) (d*) [...]"
Total: 2 packages (1 in new slot, 1 reinstall), Size of downloads: 0 KiB
* Error: circular dependencies:
(sys-devel/gcc-13.3.1_p20240614:13/13::gentoo, ebuild scheduled for merge) depends on
(sys-devel/gcc-11.5.0:11/11::gentoo, ebuild scheduled for merge) (buildtime)
(sys-devel/gcc-13.3.1_p20240614:13/13::gentoo, ebuild scheduled for merge) (buildtime)
```
Portage sees sys-devel/gcc[ada] is queued and tries to use it to satisfy
the dep for 11, which pulls in 13, which pulls in 11 for D.
We can workaround this by depending on older GCC for whatever slot we're
in. This matches upstream documentation and also reality as you usually
need an older version anyway.
See also 370253f008a8922c9aebe8099ab9c34bd6947f66 in binhost.git.
Bug: https://bugs.gentoo.org/880825
Signed-off-by: Sam James <sam@gentoo.org>
Clang 19 deprecates the GCC_INSTALL_PREFIX CMake option.
We now handle this via config files installed by gcc-config. If there's
any remaining issues for Prefix, it should be handled over there
or in sys-devel/clang-common.
Closes: https://bugs.gentoo.org/939816
Signed-off-by: Sam James <sam@gentoo.org>
toolchain.eclass hasn't supported versions of GCC that included GCJ
for a while (see ::toolchain and toolchain-legacy.eclass if interested
in that), so drop an obsolete Java workaround we forgot to remove
when cleaning up the rest.
Bug: https://bugs.gentoo.org/384291
Signed-off-by: Sam James <sam@gentoo.org>
gnat-gpl only exists for (bootstrapping) Ada. Until bug #940471 is handled,
force Ada on. Once it is split/moved/gutted, this won't be necessary
as it'll always build Ada.
Bug: https://bugs.gentoo.org/940471
Signed-off-by: Sam James <sam@gentoo.org>
type -P is used in ebuild context, not in the script itself (it is expanded
in the heredoc), so we can use POSIX shell. It might make things slightly
faster given these tools get invoked a lot during the build.
Signed-off-by: Sam James <sam@gentoo.org>
GCC 11 is the last version of GDC which doesn't need GDC to build, so
it's useful for bootstrapping. Given the recent toolchain.eclass work,
it'd be a shame to not facilitate things working Out Of The Box until
we have some alternative package set up (see bug #940470).
So, unmask for now as a temporary reprieve. But really, please don't
use GCC 11 unless you must, as it's EOL.
This reverts the following commits:
* 4bb56f21a4
* 0f5f8e27a0
* 7de3c29b71
(Really, a lot of the value in masking old GCCs is to push people
to check `gcc-config` and so on anyway, and most people will have
hopefully done that by now in response to the mask a week ago.
That doesn't make the mask pointless -- if anyone files a bug with GCC 11,
we're going to tell them to try >= GCC 12, and package maintainers aren't
expected to try make things work with < GCC 12 and so on, but it does
mean unmasking doesn't do much harm.)
Bug: https://bugs.gentoo.org/940470
Signed-off-by: Sam James <sam@gentoo.org>
When bootstrapping D for >= GCC 12 - where we enable _GLIBCXX_ASSERTIONS
by default for USE=hardened - using GCC 11, we run into trouble where
an implementation detail of _GLIBCXX_ASSERTIONS changed: see PR104807,
r12-7504-gd3a757af21ac33, and r12-7522-g4cb935cb69f120.
Workaround this by just disabling _GLIBCXX_ASSERTIONS for the stage 1
compiler (where it's not particularly important anyway) when USE=hardened
and we're building D. We could make this more conditional if needed
but I don't think it's worth it. In fact, maybe we should do this
unconditionally for a minor speed boost in building.
Bug: https://gcc.gnu.org/PR104807
Bug: https://bugs.gentoo.org/940470
Signed-off-by: Sam James <sam@gentoo.org>