From 0d104a645a105be616d4579afe47d52e51d0b1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 18 Nov 2025 00:20:55 +0100 Subject: [PATCH] test: fix glibc_compat test for s390x which does not have local atexit --- test/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 index 6c2c924cae..277bbb035d 100644 --- 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); }