summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend1
-rw-r--r--recipes-devtools/clang/clang/0001-libcxx-use-constexpr-when-using-glibc.patch48
-rw-r--r--recipes-devtools/clang/common.inc5
-rw-r--r--recipes-devtools/clang/libcxx_git.bb23
-rw-r--r--recipes-devtools/clang/libcxxabi_git.bb61
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 @@
1RDEPENDS_${PN}_toolchain-clang += "\ 1RDEPENDS_${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 @@
1From e57d8fcd1d70c4be85f8f07722d1c1d61fe51d2a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 23:22:52 -0700
4Subject: [PATCH] libcxx: use constexpr when using glibc
5
6POSIX does not permit using PTHREAD_COND_INITIALIZER except for static
7initialization, and certainly does not permit using it as a value
8
9also POSIX does not specify the type of the object (it's opaque) so if
10there are any types for which their code would be invalid C++, then their
11code is invalid
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 include/__mutex_base | 10 ++++++++--
16 1 file changed, 8 insertions(+), 2 deletions(-)
17
18diff --git a/include/__mutex_base b/include/__mutex_base
19index 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--
472.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 ="\
29LIBCXXPATCHES = "\ 29LIBCXXPATCHES = "\
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
33LIBCXXPATCHES_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
12inherit cmake pythonnative 12inherit cmake pythonnative
13PV .= "+git${SRCPV}" 13PV .= "+git${SRCPV}"
14 14
15DEPENDS += "libcxxabi ninja-native" 15DEPENDS += "ninja-native"
16BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" 16BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx"
17BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind" 17BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind"
18BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt" 18#BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt"
19 19
20 20
21LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \ 21LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \
@@ -36,23 +36,26 @@ S = "${WORKDIR}/git"
36THUMB_TUNE_CCARGS = "" 36THUMB_TUNE_CCARGS = ""
37#TUNE_CCARGS += "-nostdlib" 37#TUNE_CCARGS += "-nostdlib"
38 38
39EXTRA_OECMAKE += "-DLIBCXX_CXX_ABI=libcxxabi \ 39EXTRA_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
48EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=True " 51EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON "
49 52
50do_compile() { 53do_compile() {
51 NINJA_STATUS="[%p] " ninja ${PARALLEL_MAKE} 54 NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} cxxabi cxx
52} 55}
53 56
54do_install() { 57do_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
58ALLOW_EMPTY_${PN} = "1" 61ALLOW_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
4DESCRIPTION = "libc++ is a new implementation of the C++ standard library, targeting C++11"
5HOMEPAGE = "http://libcxxabi.llvm.org/"
6LICENSE = "MIT | NCSA"
7SECTION = "base"
8
9require clang.inc
10require common.inc
11
12TOOLCHAIN = "clang"
13
14inherit cmake
15PV .= "+git${SRCPV}"
16
17DEPENDS += "compiler-rt ninja-native"
18BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx"
19BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind"
20
21LIC_FILES_CHKSUM = "file://projects/libcxxabi/LICENSE.TXT;md5=8ae94dd6195890583eee15a988b6ea79; \
22 "
23SRC_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
32SRCREV_FORMAT = "llvm_libcxx_cxxabi"
33
34S = "${WORKDIR}/git"
35
36THUMB_TUNE_CCARGS = ""
37#TUNE_CCARGS += "-nostdlib"
38EXTRA_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"
49CXXFLAGS_append_libc-musl = " -D_LIBCPP_HAS_MUSL_LIBC "
50
51do_compile() {
52 NINJA_STATUS="[%p] " ninja ${PARALLEL_MAKE}
53}
54
55do_install() {
56 NINJA_STATUS="[%p] " DESTDIR=${D} ninja ${PARALLEL_MAKE} install
57}
58
59ALLOW_EMPTY_${PN} = "1"
60
61BBCLASSEXTEND = "native nativesdk"