There's another -Wlto-type-mismatch issue in GCC 11 with USE=ada and
the patch we used in >=12 doesn't apply cleanly there, not worth spending
the time on for an EOL branch.
Signed-off-by: Sam James <sam@gentoo.org>
As reported in the bug and per upstream commit b02e29558fca8053fcb811fbf5691c09a876bb5a,
-Dglib_debug is default-enabled in >=2.80 but they recommend distros default
it to off, so let's do that.
Closes: https://bugs.gentoo.org/946485
Signed-off-by: Sam James <sam@gentoo.org>
g-ir-scanner has some relocatable logic but it searches for 'lib', not 'lib64',
so it can't find itself and eventually falls back to the system installation.
Followup to cfe67c6d2d.
Closes: https://bugs.gentoo.org/946221
Signed-off-by: Sam James <sam@gentoo.org>
* Update to use zig-utils and zig eclasses instead of local
get_zig_mcpu etc. functions.
* "stage3" compilation is unified by combining build.zig options,
now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2"
target, after that we use zig.eclass with common options.
* Before migrating to the zig.eclass, test steps in src_test
have been ran sequentially in for-loop, which allowed logic inside
each step to ran parallelly but not several steps at a time. Now we
use upstream "test" step instead of separately calling all dependant
steps, so that build system can now ran all of them paralelly.
This means time spent in `src_test` is now significantly shorter.
* "zig2" in both scenarios now has explicit target which is set by
using zig-utils.eclass functions on a CBUILD/CHOST. This allows us
to skip convertion logic in CMake and bootstrap.c, so that instead
of patching them we can just update converter in zig-utils.eclass
and unify target behaviour.
* Disable autodocs generation for "std" module, since it can now
be generated on-fly with `zig std` command.
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
Signed-off-by: Sam James <sam@gentoo.org>
* Update to use llvm-r1 eclass instead of llvm, zig and
zig-utils eclasses instead of local get_zig_mcpu etc. functions.
* Port "llvm USE-flag" from 9999 ebuild.
* "stage3" compilation is unified by combining build.zig options,
now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2"
target, after that we use zig.eclass with common options.
* Before migrating to the zig.eclass, test steps in src_test
have been ran sequentially in for-loop, which allowed logic inside
each step to ran parallelly but not several steps at a time. Now we
use upstream "test" step instead of separately calling all dependant
steps, so that build system can now ran all of them paralelly.
This means time spent in `src_test` is now significantly shorter.
* "zig2" in both scenarios now has explicit target which is set by
using zig-utils.eclass functions on a CBUILD/CHOST. This allows us
to skip convertion logic in CMake and bootstrap.c, so that instead
of patching them we can just update converter in zig-utils.eclass
and unify target behaviour.
* Disable autodocs generation for "std" module, since it can now
be generated on-fly with `zig std` command.
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
Signed-off-by: Sam James <sam@gentoo.org>
This eclass is built on top of `zig-utils.eclass` and works with
`zig build` sub-commands and `build.zig` system, here called ZBS or
Zig Build System. By default it adds convenient default dependencies
and phase functions (which can be opt-out by setting `ZIG_OPTIONAL=1`)
that:
* work with dependencies from official package manager,
* configures basic sane options for `zig build`, which can be further
complemented by ebuild authors and users,
* respects user settings for verbosity and jobs number,
* has some basic support for cross-compilation, which works on my PC
with `crossdev` and QEMU-ed Docker container, but it was not tested
on real machine yet.
This is a major step in unifying behaviour and de-duplicating logic
spanning multiple ebuilds (target convertion and jobs amount
in `dev-lang/zig`, different Zig search and build options configuration
in `sys-fs/ncdu` and other ebuilds in community overlays). Mentioned
ebuilds are converted in next commits.
It is recommended to use https://github.com/BratishkaErik/zig-ebuilder
with this eclass to generate base for new ebuilds.
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
Signed-off-by: Sam James <sam@gentoo.org>
This eclass handles dependency on Zig toolchain and finds appropriate
versions/slots, converts "CHOST-style and CFLAGS" to "Zig target tuple
and CPU" formats and sets environment variables to be used by other
eclasses and ebuilds.
Most of the projects written in Zig use `build.zig` system and should
use `zig.eclass` from next commit instead. This eclass is more
low-level and can be used when `zig` commands are called from other
build systems directly. For example, when authors use `zig build-exe`
or `zig test` commands in their Makefile/meson.build/Cargo etc.
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
Signed-off-by: Sam James <sam@gentoo.org>