summaryrefslogtreecommitdiff
path: root/eclass
Commit message (Collapse)AuthorAgeFilesLines
* toolchain.eclass: abort if hybrid CPU detected w/ -march=nativeSam James2024-03-241-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, the previous approach can't work. --param doesn't fully wipe out the previous value added by -march=native, so we still get a failed comparison. Users hitting this should install app-misc/resolve-march-native, run resolve-march-native, and use that in their *FLAGS instead of -march=native - at least for sys-devel/gcc via package.env, if not in make.conf. Therefore, our only real option is to just abort when we detect a problematic situation and tell users what to do. The only other idea I had was to try taskset in src_compile which feels super brittle and not sure it'd even work at all. Thanks to Andrei for testing and debugging with us on IRC & the bug. Bug: https://bugs.gentoo.org/904426 Bug: https://bugs.gentoo.org/908523 Bug: https://bugs.gentoo.org/915389 Bug: https://bugs.gentoo.org/927688 Thanks-to: Andrei Liavonchykau <andreil499@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: improve hybrid checkSam James2024-03-241-2/+2
| | | | | | | | | Thanks to stikonas for debugging on IRC. Bug: https://bugs.gentoo.org/904426 Bug: https://bugs.gentoo.org/908523 Bug: https://bugs.gentoo.org/915389 Signed-off-by: Sam James <sam@gentoo.org>
* libtool.eclass: depend on newer >=app-portage/elt-patches-20240116Sam James2024-03-241-3/+3
| | | | | | | | | --changed-deps users will get lots of rebuilds from 18f979e09388597a04255a2f42c464cf5a05d512 anyway so let's chuck this in. Lots of fixes since the last required version 20170815. Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: require >=dev-build/libtool-2.4.7-r3Sam James2024-03-241-1/+1
| | | | | | | | Needed for c7012f128a3c04053924fa1e96ed48a1c758fc65 wrt upgrade ordering. Bug: https://bugs.gentoo.org/927650 Bug: https://bugs.gentoo.org/927662 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fortify hybrid workaroundSam James2024-03-231-1/+2
| | | | | | | | | | | | | * Make sure the result is non-empty before trying to use it as an index * Make sure the result is an integer before trying to use it as an index * Don't try to set --param ... if we had no result at all These are good ideas anyway but they happen with gnat-gpl as apparently older GCC didn't actually have the l1-cache-size thing (I thought it was a bit older than 10). Whatever. Closes: https://bugs.gentoo.org/927646 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: another error handling fixSam James2024-03-231-2/+3
| | | | | Fixes: f81ec884754b3f3d3720d40b212e12ef364821c5 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: another error handling fixSam James2024-03-231-2/+2
| | | | | | | | This one seems to be part of the previous block and was missing a comment / had misleading whitespace. Fixes: f81ec884754b3f3d3720d40b212e12ef364821c5 Signed-off-by: Sam James <sam@gentoo.org>
* llvm.org.eclass: Add 19.0.0_pre20240322 snapshotMichał Górny2024-03-231-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain.eclass: prettify gcc bz linksSam James2024-03-231-8/+8
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: drop stale autoconf 2.13 handlingSam James2024-03-231-10/+0
| | | | | | | | I knew I was meant to do something before pushing the tests branch.. (retry with the extra error handling). Fixes: f81ec884754b3f3d3720d40b212e12ef364821c5 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add various missing error handlingSam James2024-03-231-17/+17
| | | | | | Prompted by Ionen. Signed-off-by: Sam James <sam@gentoo.org>
* Revert "toolchain.eclass: default to just running the (execute) torture tests"Sam James2024-03-231-2/+2
| | | | | | This reverts commit 97b5abe929550453932060bbf078bb4352b400c1. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: default to just running the (execute) torture testsSam James2024-03-231-2/+2
| | | | | | | | | The (execute) torture tests are a nice subset we can run to make sure things aren't totally hosed. Can be overridden by setting GCC_TESTS_CHECK_TARGET=check, GCC_TESTS_RUNTESTFLAGS="". Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: don't install all .sum filesSam James2024-03-231-3/+2
| | | | | | | | | | Just rely on the validate_failures.py manifests instead. These logs get real big real fast. People can save build logs if they want to look at the tests otherwise. Bug: https://bugs.gentoo.org/214345 Bug: https://bugs.gentoo.org/253926 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: rework tests moreSam James2024-03-231-38/+110
| | | | | | | | | | | | | | Rework src_test around contrib/testsuite-management/validate_failures.py in gcc.git. This script is being used by the new Linaro CI effort and it appears well-suited to us, as it allows marking expected failures easily. Followup to 9ac3f1cf62b522236ba9efd7e923071c37df1e6d. Bug: https://bugs.gentoo.org/214345 Bug: https://bugs.gentoo.org/253926 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: install test results as orphaned files in /var/cache/gccSam James2024-03-231-11/+21
| | | | | | | | | | | | This allows comparison across versions even after they get upgraded, which is useful in itself (and across series), but also for looking into when regressions started if they're reported but started a while ago. Followup to 9ac3f1cf62b522236ba9efd7e923071c37df1e6d. Bug: https://bugs.gentoo.org/214345 Bug: https://bugs.gentoo.org/253926 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add CHOST to test data pathSam James2024-03-231-8/+8
| | | | | | | We get collisions for cross-compilers otherwise. Closes: https://bugs.gentoo.org/925037 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: use extglob for hybrid hackSam James2024-03-231-1/+1
| | | | | | Thanks Ionen! Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: split condition for readabilitySam James2024-03-231-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: add workaround for hybrid CPUsSam James2024-03-231-0/+18
| | | | | | | | | | | | | | Hybrid/big.little/PE CPUs may report an inconsistent cache size across cores which can cause GCC's bootstrapping to fail its self-comparison. When CBUILD is amd64 or x86 and -march=native is in CFLAGS, iterate over all cores and record l1-cache-size. If any differ, use the first one we found. Bug: https://gcc.gnu.org/PR111768 Closes: https://bugs.gentoo.org/904426 Closes: https://bugs.gentoo.org/908523 Closes: https://bugs.gentoo.org/915389 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: fix whitespaceSam James2024-03-231-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* tree-sitter-grammar.eclass: don't pre-strip libraryArthur Zamarin2024-03-231-0/+1
| | | | | | | | | | When STRIP is set to anon empty value, it is called during build of the shared library. By unsetting it, the strip isn't called during compile but by the portage strip phase. Closes: https://bugs.gentoo.org/927571 Closes: https://bugs.gentoo.org/927572 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* llvm.org.eclass: Remove old snapshot supportMichał Górny2024-03-231-6/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* tree-sitter-grammar.eclass: support opt in python bindingsArthur Zamarin2024-03-231-1/+85
| | | | | | | | | | | | | | | New tree-sitter cli generated bindings and code around grammars and parsers now support bulding a python wheel which supply much better API and library for consumers in python bindings. Currently I've added only python as a binding languages, even though rust, swift, and go are also available. We should add them when we see a request for them. Python will be needed for pkgcheck. When we opt in into python bindings, we call the matching distutils phase functions when `use python` is true. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tree-sitter-grammar.eclass: support for new upstream makefileArthur Zamarin2024-03-231-21/+43
| | | | | | | | | | | The build system for tree-sitters now generates a much better Makefile we can use to build the parser and grammar into a good C library. This also matches the build procedure used by upstream, making our reports easier for them to debug (we hit this issue in an old bug report on memory leak with tree-sitter-bash). Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* texlive-common.eclass: etexmf-update to call 'die' for non-"dev-telive"Florian Schmaus2024-03-191-1/+2
| | | | | | | | This also makes etexmf-update fail for packages that are outside dev-texlive/* and don't use the TexLive version scheme like dev-libs/kpathsea and soon dev-tex/hevea. Signed-off-by: Florian Schmaus <flow@gentoo.org>
* toolchain.eclass: More selectively enable cet per archKyle Elbert2024-03-181-1/+1
| | | | | | | | | | | This block enables the x86_64 specific -fcf-protection during bootstrap. Added check to ensure its only enabled there. Bug: https://bugs.gentoo.org/916381 Fixes: b6bf005b843e3d6ee10aa1f088d93c4f89055cc6 Signed-off-by: Kyle Elbert <kcelbert@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35816 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: Make CET auto-apply x86-64 flags also outside hardenedAndreas K. Hüttel2024-03-171-4/+5
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* llvm.org.eclass: Add 19.0.0_pre20240316 snapshotMichał Górny2024-03-161-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* go-env.eclass: filter LTO temporarily for gcc 14.0.1Sam James2024-03-161-2/+5
| | | | | | | | | 14.0.1 won't ever be a released version, just do this as a hack because gcc has a checking ICE w/ go LTO atm and this prohibits more testing. Bug: https://bugs.gentoo.org/912152 Bug: https://gcc.gnu.org/PR113204 Signed-off-by: Sam James <sam@gentoo.org>
* go-env.eclass: Export PKG_CONFIGJeremi Piotrowski2024-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | Go files may have cgo specifiers that use pkg-config to search for libraries to link. An example of this is: // #cgo pkg-config: gpgme One case where this occurs is when building one of the go deps of app-containers/podman-4.9.2. If the ebuild doesn't export the correct PKG_CONFIG, this results in build failures during cross-compilation. Go will find the host (CBUILD) pkg-config instead of the CHOST version which performs the lookup in the correct sysroot. Fix cross-compilation by exporting PKG_CONFIG in go-env_set_compile_environment. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com> Closes: https://github.com/gentoo/gentoo/pull/35721 Signed-off-by: Sam James <sam@gentoo.org>
* meson.eclass: crank the minimum meson for python 3.12 supportEli Schwartz2024-03-151-1/+1
| | | | | | | | | | | | | | | | | Contains the all-important commit: https://github.com/mesonbuild/meson/commit/3c3caf5163e2efdb2bc6a7089a7f4e0c5d058efb Which was backported from: https://github.com/mesonbuild/meson/commit/2d6c10908b3771216e7ce086af1ee4dc77e698c2 Needed in order to avoid randomly requiring dev-python/setuptools[python_targets_python3_12] when building software with meson that happens to run py.find_installation() (which cannot even be described as a dev-build/meson dependency, since meson can target pythons other than the one meson itself uses!) Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* dev-ada/gprconfig: MissingInheritsAlfredo Tupone2024-03-131-3/+7
| | | | Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
* distutils-r1.eclass: Set setuptools build config for all backendsMichał Górny2024-03-121-23/+19
| | | | | | | | | | | | | | | | | | Create the build config and set DIST_EXTRA_CONFIG independently of the PEP517 backend used (but only in PEP517 mode). This ensures that our build directory (and parallel build) is respected when backend values other than `setuptools` are used, particularly standalone build in dev-python/setuptools, custom backends wrapping setuptools and other PEP517 that might use setuptools internally. As an immediate benefit, this stops new versions of dev-python/setuptools from installing their `build` tree into site-packages. Thanks to Eli Schwartz for noticing this and bringing to our attention. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35695 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* linux-info.eclass: improve binpkg handlingMike Gilbert2024-03-111-5/+11
| | | | | | | | | | | | | | | | When installing a binpkg, Portage will restore the ebuild environment from when the binpkg was built. The stored values for KV_* may be different from the values that would be detected on the current system. To work around this, unset some key variables in linux-info_get_any_version when MERGE_TYPE == binary. Also, only look for the running kernel version: we can't possibly need a full kernel source tree when installing a package that has already been compiled. This gives a nice speedup as well. Closes: https://bugs.gentoo.org/926063 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* toolchain.eclass: handle quoted whitespace in EXTRA_ECONFMike Gilbert2024-03-111-1/+2
| | | | | | Code taken from econf in Portage. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* toolchain.eclass: Selectively enable cet options per archAndreas K. Hüttel2024-03-121-4/+2
| | | | | Bug: https://bugs.gentoo.org/916381 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* toolchain.eclass: pass --enable-standard-branch-detection if USE=cetSam James2024-03-111-1/+4
| | | | | | | | | This enables BTI and PAC if supported for arm64. We decided to overload USE=cet to avoid adding yet-another-USE flag to GCC, given it's the same thing. Bug: https://bugs.gentoo.org/916381 Signed-off-by: Sam James <sam@gentoo.org>
* ant-tasks.eclass: @DEPRECATEDVolkmar W. Pogatzki2024-03-101-1/+2
| | | | | | | all packages which inherit ant-tasks.eclass are PMASKED for removal Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
* java-ant-2.eclass: change JAVA_ANT_E_DEPEND to dev-java/antVolkmar W. Pogatzki2024-03-101-8/+6
| | | | | | | | Also removes unused eclass variable JAVA_ANT_DISABLE_ANT_CORE_DEP which becomes obsolete by removal of old dev-java/ant-core-1.10.9-r5. Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
* llvm.org.eclass: Add 19.0.0_pre20240309 snapshotMichał Górny2024-03-091-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: wire up meson-python to meson.eclassEli Schwartz2024-03-081-1/+15
| | | | | | | | | | | | | | | | | | | The meson-python build backend -- as the name suggests -- uses meson under the hood. We have a meson eclass which does lots of useful things pertinent to meson. Make sure it gets invoked, by prying out the options that meson_src_configure would use and setting passing them as our seed values for gpep517. [sam: Tweak '=' style.] [sam: Tweak mesonargs->MESONARGS for final version of e9189344b971f7ee0e2bec36650c57dbade4f122.] [sam: Update local variable list.] [mgorny: Add local variables for LTO filtering.] Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35554 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* meson.eclass: move python_export_utf8_locale to meson_src_configureSam James2024-03-081-3/+3
| | | | | | | | We don't need it in setup_meson_src_configure as distutils-r1 uses it and it'll get called twice then. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Fix python_doheader install location with ROOTJames Le Cuirot2024-03-081-1/+1
| | | | | | | | | | python_get_includedir is prefixed with ESYSROOT, not EPREFIX, so we need to strip off the former, not the latter. This is currently only used for dev-python/pillow, which I have tested. Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Make vars local before calling filter-ltoMichał Górny2024-03-081-0/+4
| | | | | | | Make LTO filtering local to the compilation code. This avoids disabling LTO for non-Python parts of an ebuild. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move filter-lto into DISTUTILS_EXT blockMichał Górny2024-03-081-6/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Limit DISTUTILS_EXT logic to compile & testMichał Górny2024-03-081-1/+7
| | | | | | | | | | | Perform the environment modifications specific to DISTUTILS_EXT to python_compile and python_test phases. These are the only phases where we expect extension builds to be called. This allows us to limit the scope of localized CPPFLAGS, as we both want to avoid leaking changes to non-Python parts of the build and let ebuilds to manipulate flags at their leisure, particularly prior to python_compile. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove -Werror... hack (now in cython)Michał Górny2024-03-081-5/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain.eclass: enable LTO for libgccjit buildSam James2024-03-071-1/+1
| | | | | | | | Note that this is just about LTO support, not building it with LTO. See https://inbox.sourceware.org/jit/dd6f69da-757b-49ba-864a-377a8dc393cf@zoho.com/T/#t. Signed-off-by: Sam James <sam@gentoo.org>
* llvm.org.eclass: Enable prebuilt manpages for LLVM 18Michał Górny2024-03-061-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>