Unable to link RISC-V linux-gnu and linux-musl executables using zig cc and CMake #22165
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
linking
Milestone
Zig Version
0.14.0-dev.2384+cbc05e0b1
Steps to Reproduce and Observed Behavior
Simple toolchain file:
The try-static-library thing is just to avoid the compiler checks. The linking step fails, so we want the compiler check.
Simple build script:
Compiler test:
It's erroneously trying to link against libatomic:
-latomic
. Same behavior on both linux-gnu and linux-musl.As a sanity check I tried to compile manually on the command-line, and that works as -latomic is not being added. But, maybe this is a CMake bug? And is -latomic supposed to be present? Can it be an empty library?
Expected Behavior
Don't link against libatomic.
The text was updated successfully, but these errors were encountered: