Skip to content

Commit

Permalink
libcxx: Fix nativesdk building
Browse files Browse the repository at this point in the history
Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
  • Loading branch information
esben authored and kraj committed Apr 26, 2022
1 parent f3c3e49 commit 12a5f8b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions recipes-devtools/clang/libcxx_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_

DEPENDS += "ninja-native"
DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs"
DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_ARCH} nativesdk-compiler-rt"
DEPENDS:append:class-native = " clang-native"

LIBCPLUSPLUS = ""
COMPILER_RT ?= "-rtlib=compiler-rt"

# Trick clang.bbclass into not creating circular dependencies
UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
COMPILER_RT:class-nativesdk = "-rtlib=libgcc --unwindlib=libgcc"
LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"

CC:append:toolchain-clang:class-native = " -unwindlib=libgcc -rtlib=libgcc"
CC:append:toolchain-clang:class-nativesdk = " -unwindlib=libgcc -rtlib=libgcc"

CXXFLAGS += "-stdlib=libstdc++"
LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++"
Expand Down

0 comments on commit 12a5f8b

Please sign in to comment.