zig
zig copied to clipboard
Some tooling fails due the the lack of GNU linker replacement, for example `zig ld`
Zig Version
0.14
Steps to Reproduce and Observed Behavior
In a fresh linux system with zig downloaded, but no system binutils installed, some software's tooling (especially some software using autotools) may fail to detect the correct ld:
configure:5359: checking for ld used by zig cc -target x86_64-linux-gnu
configure:5429: result: no
Of course if I install binutils using system package manager (which provides GNU linker ld command), the above error may be fixed.
Expected Behavior
Since zig is based on clang, and LLVM has its own linker, zig should provide the LLVM's linker via a command like zig ld. So that I can export LD='zig ld' to tell the tooling to use the correct linker.
Or some tooling may depend on system installed GNU linker. And their behavior may be different.
zig should provide the LLVM's linker via a command like zig ld
It's provided with zig ld.lld
It's provided with
zig ld.lld
This is not shown in zig help command