zig icon indicating copy to clipboard operation
zig copied to clipboard

Segfaults when linking on PowerPC

Open bortzmeyer opened this issue 9 months ago • 7 comments

Zig Version

0.12.0-dev.1710+2bffd8101

Steps to Reproduce and Observed Behavior

  1. Write any Zig program with a main, even a very simple one
  2. zig build-exe

Here is an example:

$ cat simple.zig 
pub fn main() void {
   const a = 3;
   _ = a;
}

$ zig build-exe simple.zig 
LLVM Emit Object... Segmentation fault

zig build-lib or build-obj works fine so I assume the problem is in the linker.

Expected Behavior

This is on a PowerPC machine:

$ uname -a
Linux cfarm203 6.0.0-6-powerpc64 #1 SMP Debian 6.0.12-1 (2022-12-09) ppc64 GNU/Linux

I can run more tests if you wish.

bortzmeyer avatar Nov 24 '23 10:11 bortzmeyer