summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/libcxx_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/libcxx_git.bb')
-rw-r--r--recipes-devtools/clang/libcxx_git.bb36
1 files changed, 16 insertions, 20 deletions
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb
index 3f2f6bb..c7f3a77 100644
--- a/recipes-devtools/clang/libcxx_git.bb
+++ b/recipes-devtools/clang/libcxx_git.bb
@@ -1,7 +1,7 @@
1# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com> 1# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms) 2# Released under the MIT license (see COPYING.MIT for the terms)
3 3
4DESCRIPTION = "libc++ is a new implementation of the C++ standard library, targeting C++11" 4SUMMARY = "libc++ is a new implementation of the C++ standard library, targeting C++11 and above"
5HOMEPAGE = "http://libcxx.llvm.org/" 5HOMEPAGE = "http://libcxx.llvm.org/"
6SECTION = "base" 6SECTION = "base"
7 7
@@ -21,26 +21,19 @@ PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_
21 21
22DEPENDS += "ninja-native" 22DEPENDS += "ninja-native"
23DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" 23DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs"
24DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_ARCH} nativesdk-compiler-rt" 24DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} nativesdk-compiler-rt"
25DEPENDS:append:class-native = " clang-native" 25DEPENDS:append:class-native = " clang-native compiler-rt-native"
26
27LIBCPLUSPLUS = ""
28COMPILER_RT ?= "-rtlib=compiler-rt"
29 26
27COMPILER_RT ?= "${@bb.utils.contains("PACKAGECONFIG", "compiler-rt", "-rtlib=compiler-rt", "-rtlib=libgcc", d)}"
28UNWINDLIB ?= "${@bb.utils.contains("PACKAGECONFIG", "unwind", "-unwindlib=none", "-unwindlib=libgcc", d)}"
29LIBCPLUSPLUS ?= "-stdlib=libstdc++"
30# Trick clang.bbclass into not creating circular dependencies 30# Trick clang.bbclass into not creating circular dependencies
31UNWINDLIB:class-nativesdk = "--unwindlib=libgcc" 31UNWINDLIB:class-nativesdk = "-unwindlib=libgcc"
32COMPILER_RT:class-nativesdk = "-rtlib=libgcc --unwindlib=libgcc"
33LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++" 32LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
33UNWINDLIB:class-native = "-unwindlib=libgcc"
34LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
34 35
35CC:append:toolchain-clang:class-native = " -unwindlib=libgcc -rtlib=libgcc" 36LDFLAGS:append = " ${UNWINDLIB}"
36CC:append:toolchain-clang:class-nativesdk = " -unwindlib=libgcc -rtlib=libgcc"
37
38CXXFLAGS += "-stdlib=libstdc++"
39LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++"
40BUILD_CXXFLAGS += "-stdlib=libstdc++"
41BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++"
42BUILD_CPPFLAGS:remove = "-stdlib=libc++"
43BUILD_LDFLAGS:remove = "-stdlib=libc++ -lc++abi"
44 37
45INHIBIT_DEFAULT_DEPS = "1" 38INHIBIT_DEFAULT_DEPS = "1"
46 39
@@ -49,8 +42,8 @@ LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da39
49 file://libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ 42 file://libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \
50" 43"
51 44
52OECMAKE_TARGET_COMPILE = "cxxabi cxx" 45OECMAKE_TARGET_COMPILE = "${@bb.utils.contains("TC_CXX_RUNTIME", "llvm", "unwind", "", d)} cxxabi cxx"
53OECMAKE_TARGET_INSTALL = "install-cxx install-cxxabi ${@bb.utils.contains("TC_CXX_RUNTIME", "llvm", "install-unwind", "", d)}" 46OECMAKE_TARGET_INSTALL = "${@bb.utils.contains("TC_CXX_RUNTIME", "llvm", "install-unwind", "", d)} install-cxxabi install-cxx"
54 47
55OECMAKE_SOURCEPATH = "${S}/llvm" 48OECMAKE_SOURCEPATH = "${S}/llvm"
56EXTRA_OECMAKE += "\ 49EXTRA_OECMAKE += "\
@@ -116,4 +109,7 @@ FILES:libunwind:runtime-llvm = "${libdir}/libunwind.so.*"
116FILES:${PN}-dev += "${datadir}/libc++/v1/ ${libdir}/libc++.modules.json" 109FILES:${PN}-dev += "${datadir}/libc++/v1/ ${libdir}/libc++.modules.json"
117 110
118BBCLASSEXTEND = "native nativesdk" 111BBCLASSEXTEND = "native nativesdk"
119TOOLCHAIN:forcevariable = "clang" 112TOOLCHAIN = "clang"
113# Overrides defaults from clang.bbclass
114TOOLCHAIN:class-nativesdk = "clang"
115TOOLCHAIN:class-native = "clang"