diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-07-31 08:47:08 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2017-07-31 08:47:08 -0700 |
commit | baa7a53f8b83914c56ce248f101956b16bc1036d (patch) | |
tree | cf99455d172d881071a376ab1e0927c91f0dc71f | |
parent | 56de005d89791ad33b58717103be92733f9258e4 (diff) | |
download | meta-clang-baa7a53f8b83914c56ce248f101956b16bc1036d.tar.gz |
libcxx: Merge libcxxabi needs into libcxx
This is preferred way of building libc++ and
it also means we do not need musl specific tweaks
since top level build from llvm already know
musl and make right choices
Signed-off-by: Khem Raj <raj.khem@gmail.com>
5 files changed, 13 insertions, 125 deletions
diff --git a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend index 1377e09..299cc25 100644 --- a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend +++ b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend | |||
@@ -1,6 +1,5 @@ | |||
1 | RDEPENDS_${PN}_toolchain-clang += "\ | 1 | RDEPENDS_${PN}_toolchain-clang += "\ |
2 | libcxx-dev \ | 2 | libcxx-dev \ |
3 | libcxxabi-dev \ | ||
4 | compiler-rt-dev \ | 3 | compiler-rt-dev \ |
5 | compiler-rt-staticdev \ | 4 | compiler-rt-staticdev \ |
6 | llvm-libunwind-dev \ | 5 | llvm-libunwind-dev \ |
diff --git a/recipes-devtools/clang/clang/0001-libcxx-use-constexpr-when-using-glibc.patch b/recipes-devtools/clang/clang/0001-libcxx-use-constexpr-when-using-glibc.patch deleted file mode 100644 index c295276..0000000 --- a/recipes-devtools/clang/clang/0001-libcxx-use-constexpr-when-using-glibc.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From e57d8fcd1d70c4be85f8f07722d1c1d61fe51d2a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 19 May 2016 23:22:52 -0700 | ||
4 | Subject: [PATCH] libcxx: use constexpr when using glibc | ||
5 | |||
6 | POSIX does not permit using PTHREAD_COND_INITIALIZER except for static | ||
7 | initialization, and certainly does not permit using it as a value | ||
8 | |||
9 | also POSIX does not specify the type of the object (it's opaque) so if | ||
10 | there are any types for which their code would be invalid C++, then their | ||
11 | code is invalid | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | include/__mutex_base | 10 ++++++++-- | ||
16 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/include/__mutex_base b/include/__mutex_base | ||
19 | index 3b2453f1b..08f35434f 100644 | ||
20 | --- a/include/__mutex_base | ||
21 | +++ b/include/__mutex_base | ||
22 | @@ -48,7 +48,10 @@ class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mut | ||
23 | public: | ||
24 | _LIBCPP_INLINE_VISIBILITY | ||
25 | #ifndef _LIBCPP_CXX03_LANG | ||
26 | - constexpr mutex() = default; | ||
27 | +#ifdef __GLIBC__ | ||
28 | + constexpr | ||
29 | +#endif | ||
30 | + mutex() = default; | ||
31 | #else | ||
32 | mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;} | ||
33 | #endif | ||
34 | @@ -296,7 +299,10 @@ class _LIBCPP_TYPE_VIS condition_variable | ||
35 | public: | ||
36 | _LIBCPP_INLINE_VISIBILITY | ||
37 | #ifndef _LIBCPP_CXX03_LANG | ||
38 | - constexpr condition_variable() _NOEXCEPT = default; | ||
39 | +#ifdef __GLIBC__ | ||
40 | + constexpr | ||
41 | +#endif | ||
42 | + condition_variable() _NOEXCEPT = default; | ||
43 | #else | ||
44 | condition_variable() _NOEXCEPT {__cv_ = (__libcpp_condvar_t)_LIBCPP_CONDVAR_INITIALIZER;} | ||
45 | #endif | ||
46 | -- | ||
47 | 2.13.1 | ||
48 | |||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index faac40d..9691e6a 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
@@ -29,8 +29,3 @@ LIBCXXABIPATCHES ="\ | |||
29 | LIBCXXPATCHES = "\ | 29 | LIBCXXPATCHES = "\ |
30 | file://0002-libcxx-Do-not-include-xlocale.h-on-glibc.patch;patchdir=projects/libcxx \ | 30 | file://0002-libcxx-Do-not-include-xlocale.h-on-glibc.patch;patchdir=projects/libcxx \ |
31 | " | 31 | " |
32 | |||
33 | LIBCXXPATCHES_append_libc-musl = "\ | ||
34 | file://0001-libcxx-use-constexpr-when-using-glibc.patch;patchdir=projects/libcxx \ | ||
35 | " | ||
36 | |||
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index da0d44c..26a14d0 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb | |||
@@ -12,10 +12,10 @@ require common.inc | |||
12 | inherit cmake pythonnative | 12 | inherit cmake pythonnative |
13 | PV .= "+git${SRCPV}" | 13 | PV .= "+git${SRCPV}" |
14 | 14 | ||
15 | DEPENDS += "libcxxabi ninja-native" | 15 | DEPENDS += "ninja-native" |
16 | BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" | 16 | BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" |
17 | BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind" | 17 | BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind" |
18 | BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt" | 18 | #BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt" |
19 | 19 | ||
20 | 20 | ||
21 | LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \ | 21 | LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \ |
@@ -36,23 +36,26 @@ S = "${WORKDIR}/git" | |||
36 | THUMB_TUNE_CCARGS = "" | 36 | THUMB_TUNE_CCARGS = "" |
37 | #TUNE_CCARGS += "-nostdlib" | 37 | #TUNE_CCARGS += "-nostdlib" |
38 | 38 | ||
39 | EXTRA_OECMAKE += "-DLIBCXX_CXX_ABI=libcxxabi \ | 39 | EXTRA_OECMAKE += "\ |
40 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/projects/libcxxabi/include \ | 40 | -DLIBCXX_CXX_ABI=libcxxabi \ |
41 | -DLLVM_PATH=${S} \ | ||
42 | -DLIBCXX_ENABLE_SHARED=ON \ | 41 | -DLIBCXX_ENABLE_SHARED=ON \ |
43 | -DLIBCXX_ENABLE_EXCEPTIONS=ON \ | 42 | -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \ |
43 | -DCXX_SUPPORTS_CXX11=ON \ | ||
44 | -DLIBCXXABI_LIBCXX_INCLUDES=${S}/projects/libcxx/include \ | ||
45 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/projects/libcxxabi/include \ | ||
46 | -DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/lib \ | ||
44 | -G Ninja \ | 47 | -G Ninja \ |
45 | ${S}/projects/libcxx \ | 48 | ${S} \ |
46 | " | 49 | " |
47 | 50 | ||
48 | EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=True " | 51 | EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " |
49 | 52 | ||
50 | do_compile() { | 53 | do_compile() { |
51 | NINJA_STATUS="[%p] " ninja ${PARALLEL_MAKE} | 54 | NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} cxxabi cxx |
52 | } | 55 | } |
53 | 56 | ||
54 | do_install() { | 57 | do_install() { |
55 | NINJA_STATUS="[%p] " DESTDIR=${D} ninja ${PARALLEL_MAKE} install | 58 | NINJA_STATUS="[%p] " DESTDIR=${D} ninja ${PARALLEL_MAKE} install-cxxabi install-cxx |
56 | } | 59 | } |
57 | 60 | ||
58 | ALLOW_EMPTY_${PN} = "1" | 61 | ALLOW_EMPTY_${PN} = "1" |
diff --git a/recipes-devtools/clang/libcxxabi_git.bb b/recipes-devtools/clang/libcxxabi_git.bb deleted file mode 100644 index fa10712..0000000 --- a/recipes-devtools/clang/libcxxabi_git.bb +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | # Copyright (C) 2015 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | DESCRIPTION = "libc++ is a new implementation of the C++ standard library, targeting C++11" | ||
5 | HOMEPAGE = "http://libcxxabi.llvm.org/" | ||
6 | LICENSE = "MIT | NCSA" | ||
7 | SECTION = "base" | ||
8 | |||
9 | require clang.inc | ||
10 | require common.inc | ||
11 | |||
12 | TOOLCHAIN = "clang" | ||
13 | |||
14 | inherit cmake | ||
15 | PV .= "+git${SRCPV}" | ||
16 | |||
17 | DEPENDS += "compiler-rt ninja-native" | ||
18 | BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" | ||
19 | BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind" | ||
20 | |||
21 | LIC_FILES_CHKSUM = "file://projects/libcxxabi/LICENSE.TXT;md5=8ae94dd6195890583eee15a988b6ea79; \ | ||
22 | " | ||
23 | SRC_URI = "\ | ||
24 | ${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \ | ||
25 | ${LLVM_GIT}/libcxx.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libcxx;destsuffix=git/projects/libcxx \ | ||
26 | ${LLVM_GIT}/libcxxabi.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=cxxabi;destsuffix=git/projects/libcxxabi \ | ||
27 | ${LLVMPATCHES} \ | ||
28 | ${LIBCXXPATCHES} \ | ||
29 | ${LIBCXXABIPATCHES} \ | ||
30 | " | ||
31 | |||
32 | SRCREV_FORMAT = "llvm_libcxx_cxxabi" | ||
33 | |||
34 | S = "${WORKDIR}/git" | ||
35 | |||
36 | THUMB_TUNE_CCARGS = "" | ||
37 | #TUNE_CCARGS += "-nostdlib" | ||
38 | EXTRA_OECMAKE += "-DLIBCXXABI_LIBCXX_PATH=${S}/projects/libcxx \ | ||
39 | -DLLVM_PATH=${S} \ | ||
40 | -DLLVM_ENABLE_LIBCXX=OFF \ | ||
41 | -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \ | ||
42 | -DLIBCXXABI_LIBCXX_INCLUDES=${S}/projects/libcxx/include \ | ||
43 | -DLLVM_BUILD_EXTERNAL_COMPILER_RT=True \ | ||
44 | -DCXX_SUPPORTS_CXX11=ON \ | ||
45 | -DLIBCXXABI_ENABLE_SHARED=ON \ | ||
46 | -G Ninja \ | ||
47 | ${S}/projects/libcxxabi \ | ||
48 | " | ||
49 | CXXFLAGS_append_libc-musl = " -D_LIBCPP_HAS_MUSL_LIBC " | ||
50 | |||
51 | do_compile() { | ||
52 | NINJA_STATUS="[%p] " ninja ${PARALLEL_MAKE} | ||
53 | } | ||
54 | |||
55 | do_install() { | ||
56 | NINJA_STATUS="[%p] " DESTDIR=${D} ninja ${PARALLEL_MAKE} install | ||
57 | } | ||
58 | |||
59 | ALLOW_EMPTY_${PN} = "1" | ||
60 | |||
61 | BBCLASSEXTEND = "native nativesdk" | ||