Closed mmomtchev closed 6 days ago
I think that the missing part is the relocatable prologue/epilogue - is it possible that these must be enabled when installing?
I don't know. Traditionally, on Linux, clang used the system & GCC libraries. Only in relatively recent releases they added --rtlib=compiler-rt
, but I don't know if this configuration can be made to link standalone.
In my Linux tests I always install the system gcc, even if it is an old version.
Could you check the binaries from https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.6 to see if those files are also referred?
From one of the runtime authors https://discourse.llvm.org/t/cross-compile-any-llvm-component-using-clang-only-no-gcc-requirement/80282/24?page=2:
libgcc objects such as crtbegin.o and its friends can alternatively come from compiler-rt.
Glibc objects such as crt1.o, Scrt1.o, rcrt1.o can alternatively come from llvm-libc (which, unfortunately, does not work properly yet).
Inside LLVM, there is llvm-project/llvm-libgcc at main · llvm/llvm-project · GitHub which actually helps you to bundle a libgcc-alike library from compiler-rt. Notice that you are not supposed to use this because llvm-libgcc is for those who want cheat gnu toolchain that they have libgcc*. If you want the whole system to be of LLVM-flavor, you should not need this trick.
Entry/exit code is part of the glibc
distribution and not the compiler runtime. Ie, on Debian/Ubuntu, this would be the libc6-dev
package.
Thank you for clarifying this.
When building on Linux on a machine without a system default compiler installed, I am getting errors about missing compiler runtime:
https://github.com/mmomtchev/magickwand.js/actions/runs/10898992793/job/30243447516
When compiling locally:
I see that parts of the
gcc
runtime are used:I think that the missing part is the relocatable prologue/epilogue - is it possible that these must be enabled when installing?