... 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>
... to find the bundled gnatmake and friends, as the build system
doesn't consistently respect the env var.
Closes: https://bugs.gentoo.org/940582
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>