authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-18 00:20:55+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-19 01:42:45+01:00
log0d104a645a105be616d4579afe47d52e51d0b1aa
tree4708eca66d38ff58fc52594c2ca0b8a8b95720cf
parent508f676bb41e74872c08c4c9a6a4327e2f87291c
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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


1 files changed, 16 insertions(+), 12 deletions(-)

test/standalone/glibc_compat/build.zig+16-12
...@@ -141,12 +141,14 @@ pub fn build(b: *std.Build) void {...@@ -141,12 +141,14 @@ pub fn build(b: *std.Build) void {
141 check.checkInDynamicSymtab();141 check.checkInDynamicSymtab();
142 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT powf");142 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT powf");
143143
144 // An atexit local symbol is defined, and depends on undefined dynamic144 if (target.result.cpu.arch != .s390x) {
145 // __cxa_atexit.145 // An atexit local symbol is defined, and depends on undefined dynamic
146 check.checkInSymtab();146 // __cxa_atexit.
147 check.checkContains("FUNC LOCAL HIDDEN atexit");147 check.checkInSymtab();
148 check.checkInDynamicSymtab();148 check.checkContains("FUNC LOCAL HIDDEN atexit");
149 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit");149 check.checkInDynamicSymtab();
150 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit");
151 }
150152
151 test_step.dependOn(&check.step);153 test_step.dependOn(&check.step);
152 }154 }
...@@ -250,12 +252,14 @@ pub fn build(b: *std.Build) void {...@@ -250,12 +252,14 @@ pub fn build(b: *std.Build) void {
250 check.checkInDynamicSymtab();252 check.checkInDynamicSymtab();
251 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT exit");253 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT exit");
252254
253 // An atexit local symbol is defined, and depends on undefined dynamic255 if (target.result.cpu.arch != .s390x) {
254 // __cxa_atexit.256 // An atexit local symbol is defined, and depends on undefined dynamic
255 check.checkInSymtab();257 // __cxa_atexit.
256 check.checkContains("FUNC LOCAL HIDDEN atexit");258 check.checkInSymtab();
257 check.checkInDynamicSymtab();259 check.checkContains("FUNC LOCAL HIDDEN atexit");
258 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit");260 check.checkInDynamicSymtab();
261 check.checkExact("0 0 UND FUNC GLOBAL DEFAULT __cxa_atexit");
262 }
259263
260 test_step.dependOn(&check.step);264 test_step.dependOn(&check.step);
261 }265 }