Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clang: Use rtlib provided by compiler instead of hardcoding libgcc
Clang provides runtime library `libclang_rt.builtins.<arch>.a` but `libgcc.a` is also supported. The compiler can provide full path to the selected library using the `--print-libgcc-file-name` option, for example: ``` /usr/lib64/clang/17/lib/baremetal/libclang_rt.builtins-armv7m.a ``` If `--rtlib=libgcc` option is provided, clang will also provide appropriate path. This patch replaces hardcoded `libgcc` with library name extracted from path, so we are compatible with both libraries. Signed-off-by: Patryk Duda <pdk@semihalf.com>
- Loading branch information