Skip to content
Commit 624fcbaa authored by Patryk Duda's avatar Patryk Duda Committed by Carles Cufí
Browse files

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: default avatarPatryk Duda <pdk@semihalf.com>
parent f16c4324
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment