summaryrefslogtreecommitdiff
path: root/eclass
Commit message (Collapse)AuthorAgeFilesLines
* java-utils-2.eclass: add some missing function descriptionsVolkmar W. Pogatzki2024-10-021-4/+28
| | | | | | 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>
* java-utils-2.eclass: stop mentioning java-ant-2 eclassVolkmar W. Pogatzki2024-10-021-5/+4
| | | | | Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
* java-utils-2.eclass: remove java-pkg_check-jikesVolkmar W. Pogatzki2024-10-021-11/+2
| | | | | Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
* java-pkg-2.eclass: remove unused eclass functions java-pkg-2_src_{compile,test}Volkmar W. Pogatzki2024-10-021-91/+1
| | | | | | | | 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>
* toolchain.eclass: print all relevant flags, not just C{,XX}FLAGS + LDFLAGSSam James2024-10-021-3/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: restrict *FLAGS for stage1 compiler when bootstrappingEli Schwartz2024-10-011-0/+7
| | | | | | | | | | | 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>
* toolchain.eclass: also reset STAGE1_CXXFLAGS for old compilersEli Schwartz2024-10-011-0/+1
| | | | | | | | | | 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>
* cargo.eclass: Respect existing CARGO_TARGET_${TRIPLE}_RUSTFLAGSJames Le Cuirot2024-10-011-1/+1
| | | | | | | 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>
* toolchain.eclass: fix typo that prevented configuring with USE=adaEli Schwartz2024-10-011-1/+1
| | | | | | | | | | | | | | | 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>
* toolchain.eclass: conditionally pass -Wno-complain-wrong-lang for >= GCC 13Sam James2024-10-011-4/+8
| | | | | | | | ... 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>
* toolchain.eclass: don't pass --specs= to gnat* toolsSam James2024-10-011-1/+1
| | | | | | | | | 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>
* toolchain.eclass: Try harder to disable cet automagicAndrei Horodniceanu2024-10-011-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* toolchain.eclass: reflow comments slightlySam James2024-10-011-7/+7
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: further special-case dropping for ada-bootstrapSam James2024-10-011-19/+12
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: go back to PATH lookup for Ada wrappersSam James2024-10-011-1/+1
| | | | | | | This should work now that we install gcc-config-style symlinks in ada-bootstrap. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: small ada-bootstrap tweaksSam James2024-10-011-5/+6
| | | | | | | | * 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>
* toolchain.eclass: quote BROOTSam James2024-10-011-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: further adaptations to dev-lang/ada-bootstrapSam James2024-10-011-11/+31
| | | | | | This needs prettifying, which I'll do shortly. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: support dev-lang/ada-bootstrapSam James2024-10-011-9/+33
| | | | | | | | 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>
* Add gcc_14 and gcc_15 to the list of ada compilersAlfredo Tupone2024-09-301-4/+12
| | | | Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
* toolchain.eclass: tweak Ada, D depsSam James2024-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: drop obsolete Java workaroundSam James2024-09-301-4/+0
| | | | | | | | | | 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>
* toolchain.eclass: consolidate a commentSam James2024-09-301-2/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: consolidate language configure optionsSam James2024-09-301-12/+12
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: move Ada and D logic into their own functionsSam James2024-09-301-136/+149
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: switch to /bin/sh shebang for Ada wrappersSam James2024-09-301-1/+1
| | | | | | | | 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>
* toolchain.eclass: move GNAT commentSam James2024-09-301-3/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add bug reference to ada-bootstrap commentSam James2024-09-301-2/+2
| | | | | | Bug: https://bugs.gentoo.org/940471 Bug: https://bugs.gentoo.org/940472 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add explanation for 'sorry' on fallback Ada pathSam James2024-09-301-0/+3
| | | | | | | Give a nicer message to users in case they hit the 'sorry' fallback Ada path. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: unset _GLIBCXX_ASSERTIONS for stage1 with D bootstrapSam James2024-09-301-0/+9
| | | | | | | | | | | | | | | | | 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>
* toolchain.eclass: check CXXFLAGS too in -march=native sanity checkSam James2024-09-301-1/+1
| | | | | | Bug: https://bugs.gentoo.org/904426 Thanks-to: Pacho Ramos <pacho@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: drop whitespace at end of functionSam James2024-09-301-1/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: pass STAGE1_CXXFLAGSSam James2024-09-301-0/+3
| | | | | | | | | | 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>
* toolchain.eclass: attempt to use gnat-gpl if the bootstrap GNAT is too newSam James2024-09-291-1/+1
| | | | | Bug: https://bugs.gentoo.org/880825 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: start with oldest GDC and work upwards insteadSam James2024-09-291-2/+2
| | | | | | | | | | | | | | | | 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>
* toolchain.eclass: don't set GDC if we couldn't find anythingSam James2024-09-291-1/+3
| | | | | | This avoids wrongly/unnecessarily setting GDC for < GCC 12. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: start with oldest GNAT and work upwards insteadSam James2024-09-291-2/+2
| | | | | | | | | | | | | | 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>
* toolchain.eclass: use ${GNAT} for GNAT version printSam James2024-09-291-1/+1
| | | | | | It shouldn't matter as we set PATH but let's do it anyway for consistency. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: print GDC version usedSam James2024-09-291-0/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: install gdc symlink tooSam James2024-09-291-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: rework D handlingSam James2024-09-291-0/+26
| | | | | | | | | | | | | 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>
* toolchain.eclass: Ada reworkSam James2024-09-291-2/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* toolchain.eclass: more Ada cleanupSam James2024-09-291-12/+0
| | | | | | Breaks w/ pic linking and unnecessary. Use the regular build system route. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: enable libada with USE=adaSam James2024-09-291-1/+1
| | | | | | | | | | | | | | | 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>
* eclass/, profiles/: Enable PostgreSQL 17 supportPatrick Lauer2024-09-261-1/+1
| | | | Signed-off-by: Patrick Lauer <patrick@gentoo.org>
* toolchain.eclass: ban the use of rlibtoolEli Schwartz2024-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* xdg.eclass: fix EclassExportFuncsBeforeInheritSam James2024-09-251-2/+8
| | | | | | Bug: https://github.com/pkgcore/pkgcheck/issues/702 Bug: https://github.com/pkgcore/pkgcheck/issues/703 Signed-off-by: Sam James <sam@gentoo.org>
* guile.eclass: fix EclassExportFuncsBeforeInheritSam James2024-09-251-3/+3
| | | | | | Bug: https://github.com/pkgcore/pkgcheck/issues/702 Bug: https://github.com/pkgcore/pkgcheck/issues/703 Signed-off-by: Sam James <sam@gentoo.org>
* guile-single.eclass: fix EclassExportFuncsBeforeInheritSam James2024-09-251-2/+2
| | | | | | Bug: https://github.com/pkgcore/pkgcheck/issues/702 Bug: https://github.com/pkgcore/pkgcheck/issues/703 Signed-off-by: Sam James <sam@gentoo.org>
* plasma-mobile.kde.org.eclass: Remove dead eclassUlrich Müller2024-09-251-49/+0
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>