Skip to content

-target arm-linux-musleabi builds musl with hard floats enabled. #10961

@vesim987

Description

@vesim987

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    abi-sfThe software floating point ABI for various architecturesarch-arm32-bit ArmbugObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.frontendTokenization, parsing, AstGen, Sema, and Liveness.os-linuxLinux

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions