| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/38559
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
|
|
|
|
|
|
|
|
| |
The last ebuild using these functions was net-vpn/i2p-2.5.2-r1
Closes: https://bugs.gentoo.org/940526
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog@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>
|
|
|
|
|
|
|
| |
This variable is used to disable crt-static with musl.
Closes: https://bugs.gentoo.org/940197
Signed-off-by: James Le Cuirot <chewi@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>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
This needs prettifying, which I'll do shortly.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/547358
Bug: https://bugs.gentoo.org/919667
Bug: https://bugs.gentoo.org/940472
Closes: https://bugs.gentoo.org/940471
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/940471
Bug: https://bugs.gentoo.org/940472
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
Give a nicer message to users in case they hit the 'sorry' fallback
Ada path.
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>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/904426
Thanks-to: Pacho Ramos <pacho@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Note that we're reusing get_abi_CFLAGS here as multilib.eclass doesn't
have get_abi_CXXFLAGS yet (bug #940501).
Adding this for the benefit of some GDC hackery we're doing (bug #940470).
Bug: https://bugs.gentoo.org/940501
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/880825
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per https://gcc.gnu.org/install/prerequisites.html
"""
It is strongly recommended to use an older version of GDC to build GDC.
More recent versions of GDC than the version built are not guaranteed to work
and will often fail during the build with compilation errors relating to
deprecations or removed features.
"""
... so do as I just did for GNAT.
Bug: https://bugs.gentoo.org/940470
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
This avoids wrongly/unnecessarily setting GDC for < GCC 12.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per https://gcc.gnu.org/install/prerequisites.html
"""
Similarly, it is strongly recommended to use an older version of GNAT to build GNAT.
More recent versions of GNAT than the version built are not guaranteed to work
and will often fail during the build with compilation errors.
"""
Bug: https://gcc.gnu.org/PR103357
Bug: https://bugs.gentoo.org/880825
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
It shouldn't matter as we set PATH but let's do it anyway for consistency.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent work for Ada makes things easier here because you don't
have to try juggle both GNAT and GDC at the same time.
Anyway, let's do something similar: iterate over installed GCCs
and try to use the best GDC available for bootstrapping, so users
don't have to manually select it with `gcc-config`. More mangling
may be needed than setting GDC down the line.
Bug: https://bugs.gentoo.org/868228
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Look hard for an existing GNAT for use for bootstrapping without requiring
users to run `gcc-config` / switch their system copy of GCC, which is both
brittle in that it requires manual intervention, and also unclean.
Started looking at this after https://public-inbox.gentoo.org/gentoo-dev/2a700166-f01a-4807-bd76-7b0cce72af0b@archeia.com/
although the approach is different. I did use it as a base although not
much of it remains.
We take the following approach:
* Iterate over installed GCC slots (preferring ${SLOT}, then iterating
from the latest version installed down to GCC 10) to find a copy of
GNAT;
* Create wrappers for gnat* to redirect calls when building GCC to
our found bootstrap copy of GNAT;
* Use an extracted spec file to redirect gnat1 calls to that bootstrap
copy too, as the build system doesn't allow saying "just use this copy
of gnat" (it always wants $(CC) to support it).
The real nasty part here is that GCC's build system doesn't seem to have
a way to point to 'ADACC' or similar (it looks like it did have 'ADAC' years ago).
Remaining bits to be done:
* Adapting/replacing/supplementing dev-lang/gnat-gpl with a version that
can be installed in parallel to sys-devel/gcc:10 so it can be pulled
in transparently for bootstrapping;
* Build our own, or source some other copy (e.g. from Alire), of a newer
bootstrap GNAT. https://github.com/alire-project/GNAT-FSF-builds is
a likely candidate.
I also hope that we can ultimately do the same for D.
Bug: https://gcc.gnu.org/PR864
Bug: https://gcc.gnu.org/PR108909
Bug: https://bugs.gentoo.org/137268
Bug: https://bugs.gentoo.org/547358
Bug: https://bugs.gentoo.org/919667
Closes: https://bugs.gentoo.org/937774
Link: https://lists.fedorahosted.org/archives/list/epel-devel@lists.fedoraproject.org/thread/CVQ3JIOZI5ODYDZU2DZLA37JWSLMCIN7/
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Breaks w/ pic linking and unnecessary. Use the regular build system route.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was added in d6d640106d59381bf34fea26b80c31e1de8c9e6b but it's not
clear to me why.
Noticed because it causes loads of Ada test failures as UNRESOLVED,
failing with:
```
gnatmake: RTS path "/var/tmp/portage/sys-devel/gcc-15.0.9999/work/build/x86_64-pc-linux-gnu/./libada" not valid: missing adainclude and adalib directories
compiler exited with status 1
```
Fixes: d6d640106d59381bf34fea26b80c31e1de8c9e6b
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dev-build/slibtool provides an alternative implementation of libtool
which is intended to hook itself into and replace the ltmain.sh-based
./libtool shell scripts installed into an autotools build system.
It has some interesting quirks. In particular, it takes the idea of
"packagers don't want to install libtool archives for random libraries
because nobody uses them and pkg-config is better" and runs with it. It
runs quite far with it, as it doesn't install them at all without a new
flag passed to slibtool. This is redundant with our existing approach of
deleting them in src_install when we know they are useless, and is
downright broken in cases such as GCC, where the libtool archives are
load-bearing and the resultant compiler is, in their absence,
nonfunctional.
slibtool supports a variety of wrappers to enable reasonable
functionality which it by default disabled. The official recommendation
is you are supposed to use "rlibtool" to replace ./libtool as it
performs heuristics based on the generated config. But we actually need
"rclibtool", which both respects the generated config and also generates
the *.la archives and leaves it up to ebuilds to decide whether they
should be removed.
Raise a fatal error if the user has misconfigured slibtool. This
prevents the user from building a broken and malformed GCC.
Closes: https://bugs.gentoo.org/932245
Closes: https://bugs.gentoo.org/924150
Closes: https://bugs.gentoo.org/931268
Closes: https://bugs.gentoo.org/931279
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://github.com/pkgcore/pkgcheck/issues/702
Bug: https://github.com/pkgcore/pkgcheck/issues/703
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://github.com/pkgcore/pkgcheck/issues/702
Bug: https://github.com/pkgcore/pkgcheck/issues/703
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://github.com/pkgcore/pkgcheck/issues/702
Bug: https://github.com/pkgcore/pkgcheck/issues/703
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|