From baa7a53f8b83914c56ce248f101956b16bc1036d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 31 Jul 2017 08:47:08 -0700 Subject: 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 --- ...001-libcxx-use-constexpr-when-using-glibc.patch | 48 ----------------- recipes-devtools/clang/common.inc | 5 -- recipes-devtools/clang/libcxx_git.bb | 23 ++++---- recipes-devtools/clang/libcxxabi_git.bb | 61 ---------------------- 4 files changed, 13 insertions(+), 124 deletions(-) delete mode 100644 recipes-devtools/clang/clang/0001-libcxx-use-constexpr-when-using-glibc.patch delete mode 100644 recipes-devtools/clang/libcxxabi_git.bb (limited to 'recipes-devtools/clang') 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 @@ -From e57d8fcd1d70c4be85f8f07722d1c1d61fe51d2a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 19 May 2016 23:22:52 -0700 -Subject: [PATCH] libcxx: use constexpr when using glibc - -POSIX does not permit using PTHREAD_COND_INITIALIZER except for static -initialization, and certainly does not permit using it as a value - -also POSIX does not specify the type of the object (it's opaque) so if -there are any types for which their code would be invalid C++, then their -code is invalid - -Signed-off-by: Khem Raj ---- - include/__mutex_base | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/include/__mutex_base b/include/__mutex_base -index 3b2453f1b..08f35434f 100644 ---- a/include/__mutex_base -+++ b/include/__mutex_base -@@ -48,7 +48,10 @@ class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mut - public: - _LIBCPP_INLINE_VISIBILITY - #ifndef _LIBCPP_CXX03_LANG -- constexpr mutex() = default; -+#ifdef __GLIBC__ -+ constexpr -+#endif -+ mutex() = default; - #else - mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;} - #endif -@@ -296,7 +299,10 @@ class _LIBCPP_TYPE_VIS condition_variable - public: - _LIBCPP_INLINE_VISIBILITY - #ifndef _LIBCPP_CXX03_LANG -- constexpr condition_variable() _NOEXCEPT = default; -+#ifdef __GLIBC__ -+ constexpr -+#endif -+ condition_variable() _NOEXCEPT = default; - #else - condition_variable() _NOEXCEPT {__cv_ = (__libcpp_condvar_t)_LIBCPP_CONDVAR_INITIALIZER;} - #endif --- -2.13.1 - 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 ="\ LIBCXXPATCHES = "\ file://0002-libcxx-Do-not-include-xlocale.h-on-glibc.patch;patchdir=projects/libcxx \ " - -LIBCXXPATCHES_append_libc-musl = "\ - file://0001-libcxx-use-constexpr-when-using-glibc.patch;patchdir=projects/libcxx \ -" - 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 inherit cmake pythonnative PV .= "+git${SRCPV}" -DEPENDS += "libcxxabi ninja-native" +DEPENDS += "ninja-native" BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind" -BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt" +#BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt" LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \ @@ -36,23 +36,26 @@ S = "${WORKDIR}/git" THUMB_TUNE_CCARGS = "" #TUNE_CCARGS += "-nostdlib" -EXTRA_OECMAKE += "-DLIBCXX_CXX_ABI=libcxxabi \ - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/projects/libcxxabi/include \ - -DLLVM_PATH=${S} \ +EXTRA_OECMAKE += "\ + -DLIBCXX_CXX_ABI=libcxxabi \ -DLIBCXX_ENABLE_SHARED=ON \ - -DLIBCXX_ENABLE_EXCEPTIONS=ON \ + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \ + -DCXX_SUPPORTS_CXX11=ON \ + -DLIBCXXABI_LIBCXX_INCLUDES=${S}/projects/libcxx/include \ + -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/projects/libcxxabi/include \ + -DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/lib \ -G Ninja \ - ${S}/projects/libcxx \ + ${S} \ " -EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=True " +EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " do_compile() { - NINJA_STATUS="[%p] " ninja ${PARALLEL_MAKE} + NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} cxxabi cxx } do_install() { - NINJA_STATUS="[%p] " DESTDIR=${D} ninja ${PARALLEL_MAKE} install + NINJA_STATUS="[%p] " DESTDIR=${D} ninja ${PARALLEL_MAKE} install-cxxabi install-cxx } 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 @@ -# Copyright (C) 2015 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "libc++ is a new implementation of the C++ standard library, targeting C++11" -HOMEPAGE = "http://libcxxabi.llvm.org/" -LICENSE = "MIT | NCSA" -SECTION = "base" - -require clang.inc -require common.inc - -TOOLCHAIN = "clang" - -inherit cmake -PV .= "+git${SRCPV}" - -DEPENDS += "compiler-rt ninja-native" -BASEDEPENDS_remove_toolchain-clang_class-target = "libcxx" -BASEDEPENDS_remove_toolchain-clang_class-target = "llvm-libunwind" - -LIC_FILES_CHKSUM = "file://projects/libcxxabi/LICENSE.TXT;md5=8ae94dd6195890583eee15a988b6ea79; \ - " -SRC_URI = "\ - ${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \ - ${LLVM_GIT}/libcxx.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libcxx;destsuffix=git/projects/libcxx \ - ${LLVM_GIT}/libcxxabi.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=cxxabi;destsuffix=git/projects/libcxxabi \ - ${LLVMPATCHES} \ - ${LIBCXXPATCHES} \ - ${LIBCXXABIPATCHES} \ -" - -SRCREV_FORMAT = "llvm_libcxx_cxxabi" - -S = "${WORKDIR}/git" - -THUMB_TUNE_CCARGS = "" -#TUNE_CCARGS += "-nostdlib" -EXTRA_OECMAKE += "-DLIBCXXABI_LIBCXX_PATH=${S}/projects/libcxx \ - -DLLVM_PATH=${S} \ - -DLLVM_ENABLE_LIBCXX=OFF \ - -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \ - -DLIBCXXABI_LIBCXX_INCLUDES=${S}/projects/libcxx/include \ - -DLLVM_BUILD_EXTERNAL_COMPILER_RT=True \ - -DCXX_SUPPORTS_CXX11=ON \ - -DLIBCXXABI_ENABLE_SHARED=ON \ - -G Ninja \ - ${S}/projects/libcxxabi \ -" -CXXFLAGS_append_libc-musl = " -D_LIBCPP_HAS_MUSL_LIBC " - -do_compile() { - NINJA_STATUS="[%p] " ninja ${PARALLEL_MAKE} -} - -do_install() { - NINJA_STATUS="[%p] " DESTDIR=${D} ninja ${PARALLEL_MAKE} install -} - -ALLOW_EMPTY_${PN} = "1" - -BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf