diff options
Diffstat (limited to 'recipes-devtools/clang/libcxx_git.bb')
-rw-r--r-- | recipes-devtools/clang/libcxx_git.bb | 36 |
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 | ||
4 | DESCRIPTION = "libc++ is a new implementation of the C++ standard library, targeting C++11" | 4 | SUMMARY = "libc++ is a new implementation of the C++ standard library, targeting C++11 and above" |
5 | HOMEPAGE = "http://libcxx.llvm.org/" | 5 | HOMEPAGE = "http://libcxx.llvm.org/" |
6 | SECTION = "base" | 6 | SECTION = "base" |
7 | 7 | ||
@@ -21,26 +21,19 @@ PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_ | |||
21 | 21 | ||
22 | DEPENDS += "ninja-native" | 22 | DEPENDS += "ninja-native" |
23 | DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" | 23 | DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" |
24 | DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_ARCH} nativesdk-compiler-rt" | 24 | DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} nativesdk-compiler-rt" |
25 | DEPENDS:append:class-native = " clang-native" | 25 | DEPENDS:append:class-native = " clang-native compiler-rt-native" |
26 | |||
27 | LIBCPLUSPLUS = "" | ||
28 | COMPILER_RT ?= "-rtlib=compiler-rt" | ||
29 | 26 | ||
27 | COMPILER_RT ?= "${@bb.utils.contains("PACKAGECONFIG", "compiler-rt", "-rtlib=compiler-rt", "-rtlib=libgcc", d)}" | ||
28 | UNWINDLIB ?= "${@bb.utils.contains("PACKAGECONFIG", "unwind", "-unwindlib=none", "-unwindlib=libgcc", d)}" | ||
29 | LIBCPLUSPLUS ?= "-stdlib=libstdc++" | ||
30 | # Trick clang.bbclass into not creating circular dependencies | 30 | # Trick clang.bbclass into not creating circular dependencies |
31 | UNWINDLIB:class-nativesdk = "--unwindlib=libgcc" | 31 | UNWINDLIB:class-nativesdk = "-unwindlib=libgcc" |
32 | COMPILER_RT:class-nativesdk = "-rtlib=libgcc --unwindlib=libgcc" | ||
33 | LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++" | 32 | LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++" |
33 | UNWINDLIB:class-native = "-unwindlib=libgcc" | ||
34 | LIBCPLUSPLUS:class-native = "-stdlib=libstdc++" | ||
34 | 35 | ||
35 | CC:append:toolchain-clang:class-native = " -unwindlib=libgcc -rtlib=libgcc" | 36 | LDFLAGS:append = " ${UNWINDLIB}" |
36 | CC:append:toolchain-clang:class-nativesdk = " -unwindlib=libgcc -rtlib=libgcc" | ||
37 | |||
38 | CXXFLAGS += "-stdlib=libstdc++" | ||
39 | LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++" | ||
40 | BUILD_CXXFLAGS += "-stdlib=libstdc++" | ||
41 | BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" | ||
42 | BUILD_CPPFLAGS:remove = "-stdlib=libc++" | ||
43 | BUILD_LDFLAGS:remove = "-stdlib=libc++ -lc++abi" | ||
44 | 37 | ||
45 | INHIBIT_DEFAULT_DEPS = "1" | 38 | INHIBIT_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 | ||
52 | OECMAKE_TARGET_COMPILE = "cxxabi cxx" | 45 | OECMAKE_TARGET_COMPILE = "${@bb.utils.contains("TC_CXX_RUNTIME", "llvm", "unwind", "", d)} cxxabi cxx" |
53 | OECMAKE_TARGET_INSTALL = "install-cxx install-cxxabi ${@bb.utils.contains("TC_CXX_RUNTIME", "llvm", "install-unwind", "", d)}" | 46 | OECMAKE_TARGET_INSTALL = "${@bb.utils.contains("TC_CXX_RUNTIME", "llvm", "install-unwind", "", d)} install-cxxabi install-cxx" |
54 | 47 | ||
55 | OECMAKE_SOURCEPATH = "${S}/llvm" | 48 | OECMAKE_SOURCEPATH = "${S}/llvm" |
56 | EXTRA_OECMAKE += "\ | 49 | EXTRA_OECMAKE += "\ |
@@ -116,4 +109,7 @@ FILES:libunwind:runtime-llvm = "${libdir}/libunwind.so.*" | |||
116 | FILES:${PN}-dev += "${datadir}/libc++/v1/ ${libdir}/libc++.modules.json" | 109 | FILES:${PN}-dev += "${datadir}/libc++/v1/ ${libdir}/libc++.modules.json" |
117 | 110 | ||
118 | BBCLASSEXTEND = "native nativesdk" | 111 | BBCLASSEXTEND = "native nativesdk" |
119 | TOOLCHAIN:forcevariable = "clang" | 112 | TOOLCHAIN = "clang" |
113 | # Overrides defaults from clang.bbclass | ||
114 | TOOLCHAIN:class-nativesdk = "clang" | ||
115 | TOOLCHAIN:class-native = "clang" | ||