From 03130b5d2831bfdead4cbf960dc7b84c59676db6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 10 Mar 2024 17:23:09 -0700 Subject: elfuitls: Use libstdc++ instead of libc++ when using clang This avoids/workarounds a libc++ and clang include issue as reported in https://github.com/llvm/llvm-project/issues/71925#issuecomment-1987141438 Signed-off-by: Khem Raj --- conf/nonclangable.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'conf/nonclangable.conf') diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 8cf9507..e488161 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -14,9 +14,10 @@ TOOLCHAIN:pn-grub:riscv64 = "gcc" TOOLCHAIN:pn-grub:aarch64 = "gcc" # crash embeds version of gdb which is not buildable with clang TOOLCHAIN:pn-crash = "gcc" -# | ../../elfutils-0.187/libasm/asm_newscn.c:49:22: error: field 'pattern' with variable sized type 'struct FillPattern' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] -TOOLCHAIN:pn-elfutils:libc-glibc = "gcc" - +# See https://github.com/llvm/llvm-project/issues/71925 +LIBCPLUSPLUS:pn-elfutils:toolchain-clang = "-stdlib=libstdc++" +# Remove it once https://patchwork.yoctoproject.org/project/oe-core/patch/20240309235748.517154-1-raj.khem@gmail.com/ is merged +CXXFLAGS:append:pn-elfutils:toolchain-clang = " -Wno-error=unused-private-field" #| erl_bits.c:(.text+0xc2a): undefined reference to `__extendhfsf2' #| erl_bits.c:(.text+0x1bfa): undefined reference to `__truncsfhf2' #| clang-15: error: linker command failed with exit code 1 (use -v to see invocation) -- cgit v1.2.3-54-g00ecf