[klibc] [PATCH] support llvm's lld
ben at decadent.org.uk
Fri Feb 28 16:59:55 PST 2020
On Mon, 2020-01-27 at 14:05 -0800, Stanislav Fomichev wrote:
> When using clang+llvm and lld, I get the following error:
> ld.lld: error: -Ttext-segment is not supported. Use --image-base if you intend to set the base address
> Let's test whether linker is lld and use --image-base instead of
> -Ttext-segment. See llvm's rationale for not supporting -Ttext-segment:
> Note that I've tested x86_64 only, everything else is just a copy-paste.
Sorry for not responding to this sooner.
I'm open to adding support for building with LLVM, but it seems like
more changes will be needed. I tried a native x86_64 build in Debian
unstable, which has LLVM 9.0.1, and got a lot of these warnings:
clang: error: unsupported option '--print-libgcc'
clang: error: no input files
clang: warning: optimization flag '-falign-jumps=1' is not supported [-Wignored-optimization-argument]
and then an error:
In file included from usr/klibc/zlib/gzio.c:10:
In file included from /home/ben/src/klibc/klibc/usr/klibc/../include/stdio.h:11:
/home/ben/src/klibc/klibc/usr/klibc/../include/stdarg.h:9:15: fatal error: 'stdarg.h' file not found
1 error generated.
It is easier to change the specification to fit the program
than vice versa.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the klibc