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

    From Eric Joldasov@21:1/5 to All on Thu Oct 24 03:50:01 2024
    From: Eric Joldasov <bratishkaerik@getgoogleoff.me>

    * Update to use llvm-r1 eclass instead of llvm, zig-build and
    zig-toolchain functions instead of local get_zig_mcpu etc. functions.
    * Port "llvm USE-flag" and "removing memory limit flags" 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-build.eclass with common options.
    * Before migrating to the zig-build.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-toolchain 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-toolchain.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>
    ---
    .../zig-0.13.0-skip-test-stack_iterator.patch | 32 +++
    dev-lang/zig/zig-0.13.0-r1.ebuild | 242 ++++++++++++++++++
    2 files changed, 274 insertions(+)
    create mode 100644 dev-lang/zig/files/zig-0.13.0-skip-test-stack_iterator.patch
    create mode 100644 dev-lang/zig/zig-0.13.0-r1.ebuild

    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
  • From Eric Joldasov@21:1/5 to All on Fri Oct 25 23:30:01 2024
    From: Eric Joldasov <bratishkaerik@getgoogleoff.me>

    * Update to use llvm-r1 eclass instead of llvm, zig-build and
    zig-toolchain functions instead of local get_zig_mcpu etc. functions.
    * Port "llvm USE-flag" and "removing memory limit flags" 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-build.eclass with common options.
    * Before migrating to the zig-build.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-toolchain 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-toolchain.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>
    ---
    .../zig-0.13.0-skip-test-stack_iterator.patch | 32 +++
    dev-lang/zig/zig-0.13.0-r1.ebuild | 245 ++++++++++++++++++
    2 files changed, 277 insertions(+)
    create mode 100644 dev-lang/zig/files/zig-0.13.0-skip-test-stack_iterator.patch
    create mode 100644 dev-lang/zig/zig-0.13.0-r1.ebuild

    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