zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 0d104a645a105be616d4579afe47d52e51d0b1aa (tree)
parent 508f676bb41e74872c08c4c9a6a4327e2f87291c
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Tue, 18 Nov 2025 00:20:55 +0100

test: fix glibc_compat test for s390x which does not have local atexit

Diffstat:
Mtest/standalone/glibc_compat/build.zig | 28++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/test/standalone/glibc_compat/build.zig b/test/standalone/glibc_compat/build.zig @@ -141,12 +141,14 @@ pub fn build(b: *std.Build) void { check.checkInDynamicSymtab(); check.checkExact("0 0 UND FUNC GLOBAL DEFAULT powf"); - // An atexit local symbol is defined, and depends on undefined dynamic - // __cxa_atexit. - check.checkInSymtab(); - check.checkContains("FUNC LOCAL HIDDEN atexit"); - check.checkInDynamicSymtab(); - check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit"); + if (target.result.cpu.arch != .s390x) { + // An atexit local symbol is defined, and depends on undefined dynamic + // __cxa_atexit. + check.checkInSymtab(); + check.checkContains("FUNC LOCAL HIDDEN atexit"); + check.checkInDynamicSymtab(); + check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit"); + } test_step.dependOn(&check.step); } @@ -250,12 +252,14 @@ pub fn build(b: *std.Build) void { check.checkInDynamicSymtab(); check.checkExact("0 0 UND FUNC GLOBAL DEFAULT exit"); - // An atexit local symbol is defined, and depends on undefined dynamic - // __cxa_atexit. - check.checkInSymtab(); - check.checkContains("FUNC LOCAL HIDDEN atexit"); - check.checkInDynamicSymtab(); - check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit"); + if (target.result.cpu.arch != .s390x) { + // An atexit local symbol is defined, and depends on undefined dynamic + // __cxa_atexit. + check.checkInSymtab(); + check.checkContains("FUNC LOCAL HIDDEN atexit"); + check.checkInDynamicSymtab(); + check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit"); + } test_step.dependOn(&check.step); }