ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
34.8k stars 2.54k forks source link

Some arm32 targets are broken #19894

Closed Validark closed 1 month ago

Validark commented 6 months ago

Zig Version

0.13.0-dev.74+67455c5e7

Steps to Reproduce and Observed Behavior

Run:

zig init
zig build -Dtarget=arm-linux -Dcpu=cortex_m23 -Doptimize=ReleaseFast

Produces:

install
└─ install zig-empty-test
   └─ zig build-exe zig-empty-test ReleaseFast arm-linux failure
error: error: <inline asm>:1:6: instruction requires: thumb2
            stmfd sp!,{r4,r5,r6,r7}
            ^

error: the following command exited with error code 1:
/home/niles/zig/0.13.0-dev.74+67455c5e7/files/zig build-exe -OReleaseFast -target arm-linux -mcpu cortex_m23 -Mroot=/home/niles/Documents/github/zig-empty-test/src/main.zig --cache-dir /home/niles/Documents/github/zig-empty-test/zig-cache --global-cache-dir /home/niles/.cache/zig --name zig-empty-test --listen=- 
Build Summary: 2/5 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install zig-empty-test transitive failure
   └─ zig build-exe zig-empty-test ReleaseFast arm-linux failure
error: the following build command failed with exit code 1:
/home/niles/Documents/github/zig-empty-test/zig-cache/o/44e6d89a3b0853b297777f0f42fa275f/build /home/niles/zig/0.13.0-dev.74+67455c5e7/files/zig /home/niles/Documents/github/zig-empty-test /home/niles/Documents/github/zig-empty-test/zig-cache /home/niles/.cache/zig --seed 0xf36f60c5 -Za2a002dbf5025358 -Dtarget=arm-linux -Dcpu=cortex_m23 -Doptimize=ReleaseFast

Expected Behavior

Inline assembly should be valid for whatever target I select.

alexrp commented 1 month ago

This looks like a duplicate of #10411.

alexrp commented 1 month ago

This looks like a duplicate of #10411.

Confirmed; closing as duplicate.