llvmbox
llvmbox copied to clipboard
Improve dynamic linker interpreter on Linux
Currently if you just build a program with vanilla clang foo.c -o foo on Linux, foo will have a linker interpreter entry of e.g. /lib/ld-musl-x86_64.so.1 which isn't correct on most systems. This stems from the fact that llvmbox bundles musl libc.
Ideas:
- Make builds
-staticby default. This would limit llvmbox, not making it possible to link with shared libs, so this is a bad idea. - Build libc.so in addition to libc.a and have the default interpreter be an absolute path to the llvmbox installation's libc.so (libc.so contains the dynamic linker.) The problem with this approach is of course that the resulting program won't work if the llvmbox dir isn't in the same place.
- Do our best to detect the host system's dynamic linker and use that for the interpreter entry