• [gentoo-dev] [PATCH v3 3/5] dev-lang/zig: add 0.13.0-r2

    From Eric Joldasov@21:1/5 to All on Fri Dec 13 21:10:01 2024
    From: Eric Joldasov <bratishkaerik@getgoogleoff.me>

    * 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>
    ---
    ....13.0-skip-test-stack_iterator.patch (new) | 32 +++
    dev-lang/zig/zig-0.13.0-r2.ebuild (new) | 248 ++++++++++++++++++
    2 files changed, 280 insertions(+)

    diff --git a/dev-lang/zig/files/zig-0.13.0-skip-test-stack_iterator.patch b/dev-lang/zig/files/zig-0.13.0-skip-test-stack_iterator.patch
    new file mode 100644
    index 000000000000..e088af2102ed
    --- /dev/null
    +++ b/dev-lang/zig/files/zig-0.13.0-skip-test-stack_iterator.patch
    @@ -0,0 +1,32 @@
    +From: Eric Joldasov <bratishkaerik@landless-city.net>
    +
    +Skip standalone test "stack_iterator" that fail on Gentoo Linux x86_64.
    +Fails in ReleaseSafe, ReleaseFast and ReleaseSmall, but not in Debug. +Reported to upstream here https://github.com/ziglang/zig/issues/19944 .
    +
    +Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
    +
    +diff --git a/test/standalone/stack_iterator/shared_lib_unwind.zig b/test/standalone/stack_iterator/shared_lib_unwind.zig
    +index 57513a49c6..75fddb04c9 100644
    +--- a/test/standalone/stack_iterator/share