[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)
Harald van Dijk via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 30 02:09:07 PDT 2025
hvdijk wrote:
> Moreover, this patch makes gnuld the default linker for baremetal
> toolchain object. User need to pass -fuse-ld=lld explicitly to driver to select
> lld
This seems like an unrelated change, it was not mentioned in the RFC, and it breaks things: baremetal toolchains generally should not be presumed to be for the same architecture as host. On an x86_64 host, this results in `/usr/bin/ld` being used for `clang --target=riscv64`, but `/usr/bin/ld` is (generally) a linker that does not understand RISC-V targets or object files. This seems like a bad idea, can this please be reverted?
https://github.com/llvm/llvm-project/pull/144649
More information about the cfe-commits
mailing list