diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-06-10 19:34:50 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-06-14 17:39:06 -0700 |
commit | bc2b5e4b874968745fdcfbcea43e2eb8eafa592e (patch) | |
tree | ced5f4ec91ed04249f04f9b37f316e05b61f7d6f /classes/clang.bbclass | |
parent | bf842214267663966ffa34e170368d55fcebd883 (diff) | |
download | meta-clang-bc2b5e4b874968745fdcfbcea43e2eb8eafa592e.tar.gz |
Use libgcc instead of compiler-rt on klibc apps
klibc does not provide libssp functions e.g. __stack_chk_guard and
__stack_chk_guard which it expects from libc and compiler-rt code tend
to use these functions, so when using compiler-rt it ends up with
undefined symbols e.g.
/usr/lib/clang/13.0.0/lib/linux/libclang_rt.builtins-armhf.a(divmoddi4.c.o): in function `__divmoddi4':
divmoddi4.c:(.text+0x70): undefined reference to `__stack_chk_fail'
arm-yoe-linux-gnueabi-ld.bfd: divmoddi4.c:(.text+0x74): undefined reference to `__stack_chk_guard'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'classes/clang.bbclass')
-rw-r--r-- | classes/clang.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/classes/clang.bbclass b/classes/clang.bbclass index ce5d321..0f9e46c 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass | |||
@@ -15,10 +15,12 @@ PACKAGE_DEBUG_SPLIT_STYLE_toolchain-clang = "debug-without-src" | |||
15 | COMPILER_RT ??= "" | 15 | COMPILER_RT ??= "" |
16 | COMPILER_RT_powerpc = "-rtlib=libgcc ${UNWINDLIB}" | 16 | COMPILER_RT_powerpc = "-rtlib=libgcc ${UNWINDLIB}" |
17 | COMPILER_RT_armeb = "-rtlib=libgcc ${UNWINDLIB}" | 17 | COMPILER_RT_armeb = "-rtlib=libgcc ${UNWINDLIB}" |
18 | COMPILER_RT_libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" | ||
18 | 19 | ||
19 | UNWINDLIB ??= "" | 20 | UNWINDLIB ??= "" |
20 | UNWINDLIB_powerpc = "--unwindlib=libgcc" | 21 | UNWINDLIB_powerpc = "--unwindlib=libgcc" |
21 | UNWINDLIB_armeb = "--unwindlib=libgcc" | 22 | UNWINDLIB_armeb = "--unwindlib=libgcc" |
23 | UNWINDLIB_libc-klibc = "--unwindlib=libgcc" | ||
22 | 24 | ||
23 | LIBCPLUSPLUS ??= "" | 25 | LIBCPLUSPLUS ??= "" |
24 | 26 | ||