zig
zig copied to clipboard
`-target arm-linux-musleabi` builds musl with hard floats enabled.
Zig Version
0.10.0-dev.495+254b8c8d1
Steps to Reproduce
echo 'pub fn main() void {}' > main.zig
zig build-exe -target arm-linux-musleabi -mcpu arm926ej_s -lc main.zig
Expected Behavior
musleabi should enforce SoftFloat and zig should compile musl w/o issues.
This issue can be workaround by specifying soft_float in the -mcpu argument: -mcpu arm926ej_s+soft_float
Actual Behavior
clang is crashing when compiling lib/libc/musl/src/math/arm/sqrtf.c because __SOFTFP__ is not defined, and it is using the inline assembly.
I didn't looked too much into this, but it looks like llvm is crashing at codegen for passing input/output registers to/from that inline assembly.