Displaying 1 result from an estimated 1 matches for "1075283".
Did you mean:
1035283
2020 May 14
2
ld.lld ignoring --sysroot
Hello,
I'm trying to compile a Linux hello world executable on macOS.
The first step is simple:
clang -c -target x86_64-linux-gnu -c -o hello.o hello.c
But linking results in an error:
ld.lld --sysroot=/linuxroot/ -o hello -m elf_x86_64 \
-dynamic-linker /lib64/ld-linux-x86-64.so.2 \
/lib/crt1.o \
/usr/lib/x86_64-linux-gnu/crti.o ../hello.o \
/usr/lib/x86_64-linux-gnu/libc.so \