Rate This Document
Findability
Accuracy
Completeness
Readability

Some Runtime Libraries Not Supported

Error Information

1
undefined reference to `__muloti4'

Problem

A symbol is in compiler-rt instead of libgcc, especially when an inline function in the __builtin_*_overflow family of Clang is used.

Solution

Use --rtlib=compiler-rt to enable compiler-rt. This solution is applicable only to some platforms.

If libc++ or libc++abi is used, use compiler-rt instead of libgcc_s by adding -DLIBCXX_USE_COMPILER_RT=YES and -DLIBCXXABI_USE_COMPILER_RT=YES to CMake configurations. Otherwise, two runtime libraries may be linked, which does not affect functions but causes performance waste.

For details, see the LLVM official documentation at https://clang.llvm.org/docs/Toolchain.html.