Open
Description
Zig Version
0.11.0-dev.1580+a5b34a61a
Steps to Reproduce and Observed Behavior
- on linux system with static
/usr/bin/env
try to producehello.zig
executable linked with-lc
- we use stage2 exe to diagnose because stage3 cannot be built
- tldr; missing command line option
-dynamic-linker /lib/ld-musl-x86_64.so.1
$ zig2 build-exe hello.zig -lc --verbose-link
LLD Link... ld.lld --error-limit=0 -O0 -z stack-size=16777216 --gc-sections -znow -m elf_x86_64 -o hello /lib/crt1.o /lib/crti.o -L /lib hello.o --as-needed -lm -lpthread -lc -ldl -lrt -lutil /home/jerem
y/.cache/zig/o/78513c6bfd7c57d2aac0a0ce8d9f3e76/libcompiler_rt.a /lib/crtn.o
Expected Behavior
- has command line option
-dynamic-linker /lib/ld-musl-x86_64.so.1
$ zig2 build-exe hello.zig -lc --verbose-link
LLD Link... ld.lld --error-limit=0 -O0 -z stack-size=16777216 --gc-sections -znow -m elf_x86_64 -o hello /lib/crt1.o /lib/crti.o -L /lib hello.o -dynamic-linker /lib/ld-musl-x86_64.so.1 --as-needed -lm -lpthread -lc -ldl -lrt -lutil /home/jerem
y/.cache/zig/o/78513c6bfd7c57d2aac0a0ce8d9f3e76/libcompiler_rt.a /lib/crtn.o