summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/compiler-rt_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/compiler-rt_git.bb')
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb40
1 files changed, 19 insertions, 21 deletions
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 84878aa..080e53b 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -1,7 +1,11 @@
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 = "LLVM based C/C++ compiler Runtime" 4SUMMARY = "LLVM based C/C++ compiler Runtime"
5DESCRIPTIOM = "Simple builtin library that provides an \
6 implementation of the low-level target-specific \
7 hooks required by code generation and other runtime \
8 components"
5HOMEPAGE = "http://compiler-rt.llvm.org/" 9HOMEPAGE = "http://compiler-rt.llvm.org/"
6SECTION = "base" 10SECTION = "base"
7 11
@@ -22,28 +26,19 @@ INHIBIT_DEFAULT_DEPS = "1"
22 26
23DEPENDS += "ninja-native libgcc" 27DEPENDS += "ninja-native libgcc"
24DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc gcc-runtime" 28DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc gcc-runtime"
25DEPENDS:append:class-nativesdk = " clang-native clang-crosssdk-${SDK_ARCH} nativesdk-gcc-runtime" 29DEPENDS:append:class-nativesdk = " clang-native clang-crosssdk-${SDK_SYS} nativesdk-gcc-runtime"
26DEPENDS:append:class-native = " clang-native" 30DEPENDS:append:class-native = " clang-native"
27 31
28# Trick clang.bbclass into not creating circular dependencies 32# Trick clang.bbclass into not creating circular dependencies
29UNWINDLIB:class-nativesdk = "--unwindlib=libgcc" 33UNWINDLIB:class-nativesdk:toolchain-clang = "--unwindlib=libgcc"
30COMPILER_RT:class-nativesdk:toolchain-clang:runtime-llvm = "-rtlib=libgcc --unwindlib=libgcc" 34COMPILER_RT:class-nativesdk:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
31LIBCPLUSPLUS:class-nativesdk:toolchain-clang:runtime-llvm = "-stdlib=libstdc++" 35LIBCPLUSPLUS:class-nativesdk:toolchain-clang = "-stdlib=libstdc++"
32 36UNWINDLIB:class-native:toolchain-clang = "--unwindlib=libgcc"
33CXXFLAGS += "-stdlib=libstdc++" 37COMPILER_RT:class-native:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
34LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" 38LIBCPLUSPLUS:class-native:toolchain-clang = "-stdlib=libstdc++"
35BUILD_CXXFLAGS += "-stdlib=libstdc++" 39UNWINDLIB:class-target:toolchain-clang = "--unwindlib=libgcc"
36BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" 40COMPILER_RT:class-target:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
37BUILD_CPPFLAGS:remove = "-stdlib=libc++" 41LIBCPLUSPLUS:class-target:toolchain-clang = "-stdlib=libstdc++"
38BUILD_LDFLAGS:remove = "-stdlib=libc++ -lc++abi"
39
40BUILD_CC:toolchain-clang = "${CCACHE}clang"
41BUILD_CXX:toolchain-clang = "${CCACHE}clang++"
42BUILD_CPP:toolchain-clang = "${CCACHE}clang -E"
43BUILD_CCLD:toolchain-clang = "${CCACHE}clang"
44BUILD_RANLIB:toolchain-clang = "llvm-ranlib"
45BUILD_AR:toolchain-clang = "llvm-ar"
46BUILD_NM:toolchain-clang = "llvm-nm"
47 42
48PACKAGECONFIG ??= "" 43PACKAGECONFIG ??= ""
49PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" 44PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF"
@@ -128,5 +123,8 @@ BBCLASSEXTEND = "native nativesdk"
128ALLOW_EMPTY:${PN} = "1" 123ALLOW_EMPTY:${PN} = "1"
129ALLOW_EMPTY:${PN}-dev = "1" 124ALLOW_EMPTY:${PN}-dev = "1"
130 125
131TOOLCHAIN:forcevariable = "clang" 126TOOLCHAIN = "clang"
127# Overrides defaults from clang.bbclass
128TOOLCHAIN:class-nativesdk = "clang"
129TOOLCHAIN:class-native = "clang"
132SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}" 130SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}"