From cda2283e4cf3c90ea42b43dbc3a2268be6655670 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 18 May 2021 22:27:41 -0700 Subject: Replace --stdlibc=libc++ with -stdlibc=libc++ This ensures that it matches with CMake's understanding of this option and when its removed then it silently removes -stdlibc=libc++ but leaves the spurious '-' in the commandline which confuses the compiler as it them expects input from stdin Signed-off-by: Khem Raj --- classes/clang.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/clang.bbclass b/classes/clang.bbclass index b684ac5..d6a7fe8 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -22,7 +22,7 @@ UNWINDLIB_riscv32 = "--unwindlib=libgcc" UNWINDLIB_powerpc = "--unwindlib=libgcc" UNWINDLIB_armeb = "--unwindlib=libgcc" -LIBCPLUSPLUS ??= "${@bb.utils.contains("RUNTIME", "llvm", "--stdlib=libc++", "", d)}" +LIBCPLUSPLUS ??= "${@bb.utils.contains("RUNTIME", "llvm", "-stdlib=libc++", "", d)}" TARGET_CXXFLAGS_append_toolchain-clang = " ${LIBCPLUSPLUS}" TUNE_CCARGS_append_toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" @@ -95,7 +95,7 @@ def clang_base_deps(d): ret += " libgcc " if (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): ret += " libcxx " - if (d.getVar('LIBCPLUSPLUS').find('--stdlib=libc++') != -1): + if (d.getVar('LIBCPLUSPLUS').find('-stdlib=libc++') != -1): ret += " libcxx " else: ret += " virtual/${TARGET_PREFIX}compilerlibs " -- cgit v1.2.3-54-g00ecf