public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxx/, sys-libs/libcxx/files/
Date: Sun, 10 Mar 2019 19:53:09 +0000 (UTC)	[thread overview]
Message-ID: <1552247576.4457b2c99d536fc44e945e43f8fd7fbe09a0df60.mgorny@gentoo> (raw)

commit:     4457b2c99d536fc44e945e43f8fd7fbe09a0df60
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 10 18:22:23 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar 10 19:52:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4457b2c9

sys-libs/libcxx: Drop <6

Bug: https://bugs.gentoo.org/519112
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-libs/libcxx/Manifest                           |   4 -
 sys-libs/libcxx/files/Makefile                     |  38 ----
 .../libcxx/files/libcxx-3.9-cmake-static-lib.patch | 196 ------------------
 sys-libs/libcxx/files/prepare_snapshot.sh          |  16 --
 sys-libs/libcxx/libcxx-3.7.1.ebuild                | 169 ----------------
 sys-libs/libcxx/libcxx-3.9.1.ebuild                | 222 ---------------------
 sys-libs/libcxx/libcxx-4.0.1.ebuild                | 213 --------------------
 sys-libs/libcxx/libcxx-5.0.2.ebuild                | 209 -------------------
 8 files changed, 1067 deletions(-)

diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index a5405d54d24..29b7d711fc2 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -1,7 +1,3 @@
-DIST libcxx-3.7.1.src.tar.xz 995724 BLAKE2B aab68f1b99a2c817e7154b71c04c81bd809154d1ae1c077a2dfede37319070729d6d768223b6ba5e2a866d6c2f18972dd501ce517864378ebc26c49cacafb635 SHA512 08d2399a8b36aa15290733256c896c9fa43f1a1223bc5c73bbcd014fddf8880e514d2a6dcc456bcf18b537c01fb6911b092e6d9958bccd8e64e9f375ed7a1ab9
-DIST libcxx-3.9.1.src.tar.xz 1209020 BLAKE2B 510e77c2c1163babbba904933f441e8720b0d366b9f0cfa2cdde2401368c224e00efd66afc1403b0087c40549cda4ebbc4d0c4b2d0906178324fa6158502d5ad SHA512 a5976e4096624a7307b3e43f4a22ac2dc74572226e0f57af9f3ef537a14c3cff1601b7042aef9dc40a0ee53ca76b08d72eb9c253dcf34f115d3153c302db7070
-DIST libcxx-4.0.1.src.tar.xz 1446380 BLAKE2B cd871eff4c4ca25a1fe4d27f778e913fe536a0b5863ea7dd3c8895f6b743b6f039e4df71f9ba5124c98761a8099666f68e1dfd073b5ec7b9fe0007ef09a9117d SHA512 91f3f397be606989be99865d0b279557f9afb93f7a74ed10c3a74f4440e38b5694ddf452bbf2f487cacd4391606dd5c7edfe5130f2de19e2acfd6cce619d028a
-DIST libcxx-5.0.2.src.tar.xz 1530908 BLAKE2B e0c47d6803668267a71c75df873a136a2c3bec3732a08c365107b286f6dfef883edb81f9f4d22a0f312228865528bf1f15450c41803f8d3a8c8081fe12b62c25 SHA512 c77e0ea6bb3dc03270312de4a24fdd0d027448b2e182af31489031fd52f0997377c9049769930b80b2ba0062fe21317d8ae823c5e80e12128f8ae8e6f171be22
 DIST libcxx-6.0.1.src.tar.xz 1552328 BLAKE2B 65a6addd04e530c2a72e8cba207282b9e9fafc01a594d7b11f63d10b6f88eca67a3cdf90b8055e410ede358d9be1f63fbe427f308e1337833447c0260d96e1c8 SHA512 c04f628b0924d76f035f615b59d19ce42dfc19c9a8eea4fe2b22a95cfe5a037ebdb30943fd741443939df5b4cf692bc1e51c840fefefbd134e3afbe2a75fe875
 DIST libcxx-7.0.1.src.tar.xz 1638188 BLAKE2B 541d27c3801895d59ad06b15de5fe9ff0d9b5b3ef393a5fad05a12a52dd6453ecc530b0ce3129624a27e959d3c9c5f7066ebb57fd85caca538ebf4f990aa6967 SHA512 b3ad7ad95bdcf2d902b29de8a0b757d4dbc220bc1a22a813d6bcec15a34b3aa42e85c59f4cecbb318c799ca611550b44c328b37278f4349b984016ad4556c1d8
 DIST libcxx-8.0.0rc2.src.tar.xz 1755516 BLAKE2B b6c15d0d50d01e69afb376140052a1d27e2acef45796781497b35dbd8c26db88883e17105fb4e83c50097ab7a4ebf077350754bc1b1d43ef8426b82a7e92b72d SHA512 79ac5a389f5a6bcb145e8e387ae2cbdf0679996a9f66fe38a8e62cd893b6ed68943824d5538e7408b57ecfa4182aec20b837158c9a6f50188c1e9aae176a4f5f

diff --git a/sys-libs/libcxx/files/Makefile b/sys-libs/libcxx/files/Makefile
deleted file mode 100644
index 029e7295b88..00000000000
--- a/sys-libs/libcxx/files/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-CXXFLAGS+=-std=c++11 -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion \
-	  -Wpadded -Wstrict-aliasing=2 -Wstrict-overflow=4
-
-SRCDIR=..
-LIB=libc++
-STATIC=libc++.a
-MAJOR=1
-MINOR=0
-SHEXT?=.so
-SHLIB=$(LIB)$(SHEXT).$(MAJOR).$(MINOR)
-SONAME=$(LIB)$(SHEXT).$(MAJOR)
-
-SRC=$(wildcard $(SRCDIR)/src/*.cpp)
-OBJ=$(SRC:$(SRCDIR)/src/%.cpp=%.o)
-SOBJ=$(SRC:$(SRCDIR)/src/%.cpp=%.So)
-
-
-%.So: $(SRCDIR)/src/%.cpp
-	$(CXX) -I$(SRCDIR)/include $(CPPFLAGS) $(CXXFLAGS) -fPIC -nostdinc++ -c $< -o $@
-
-%.o: $(SRCDIR)/src/%.cpp
-	$(CXX) -I$(SRCDIR)/include $(CPPFLAGS) $(CXXFLAGS) -nostdinc++ -c $< -o $@
-
-$(STATIC): $(OBJ)
-	$(AR) cr $@ $^
-
-static: $(STATIC)
-
-$(SHLIB): $(SOBJ)
-	$(CXX) -fPIC -nodefaultlibs $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(LIBS)
-
-$(SONAME): $(SHLIB)
-	ln -s $< $@
-
-$(LIB)$(SHEXT): $(SONAME)
-	ln -s $< $@
-
-shared: $(SHLIB) $(SONAME) $(LIB)$(SHEXT)

diff --git a/sys-libs/libcxx/files/libcxx-3.9-cmake-static-lib.patch b/sys-libs/libcxx/files/libcxx-3.9-cmake-static-lib.patch
deleted file mode 100644
index 5f0e31864df..00000000000
--- a/sys-libs/libcxx/files/libcxx-3.9-cmake-static-lib.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From b640da0b315ead39690d4d65c76938ab8aeb5449 Mon Sep 17 00:00:00 2001
-From: Petr Hosek <phosek@chromium.org>
-Date: Mon, 8 Aug 2016 22:57:25 +0000
-Subject: [PATCH] Allow building both shared and static library
-
-This change allows building both shared and static version of libc++
-in a single build, sharing object files between both versions.
-
-Differential Revision: https://reviews.llvm.org/D23232
-
-git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@278068 91177308-0d34-0410-b5e6-96231b3b80d8
----
- CMakeLists.txt          |  5 ++++
- docs/BuildingLibcxx.rst | 11 ++++++--
- lib/CMakeLists.txt      | 71 ++++++++++++++++++++++++++++++++++---------------
- 3 files changed, 63 insertions(+), 24 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 950070d..98886b0 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -52,6 +52,7 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
- # Basic options ---------------------------------------------------------------
- option(LIBCXX_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
- option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
-+option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON)
- option(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY "Build libc++experimental.a" ON)
- option(LIBCXX_ENABLE_FILESYSTEM
-         "Build filesystem as part of libc++experimental.a" ${LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY})
-@@ -68,6 +69,10 @@ option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY "Install libc++experimental.a" OFF)
- set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
- option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
- 
-+if (NOT LIBCXX_ENABLE_SHARED AND NOT LIBCXX_ENABLE_STATIC)
-+  message(FATAL_ERROR "libc++ must be built as either a shared or static library.")
-+endif()
-+
- # ABI Library options ---------------------------------------------------------
- set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
-     "Specify C++ ABI library to use." FORCE)
-diff --git a/docs/BuildingLibcxx.rst b/docs/BuildingLibcxx.rst
-index 5dd174a..6709352 100644
---- a/docs/BuildingLibcxx.rst
-+++ b/docs/BuildingLibcxx.rst
-@@ -150,8 +150,15 @@ libc++ specific options
- 
-   **Default**: ``ON``
- 
--  Build libc++ as a shared library. If ``OFF`` is specified then libc++ is
--  built as a static library.
-+  Build libc++ as a shared library. Either :option:`LIBCXX_ENABLE_SHARED` or
-+  :option:`LIBCXX_ENABLE_STATIC` has to be enabled.
-+
-+.. option:: LIBCXX_ENABLE_STATIC:BOOL
-+
-+  **Default**: ``ON``
-+
-+  Build libc++ as a static library. Either :option:`LIBCXX_ENABLE_SHARED` or
-+  :option:`LIBCXX_ENABLE_STATIC` has to be enabled.
- 
- .. option:: LIBCXX_LIBDIR_SUFFIX:STRING
- 
-diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index afc388e..cabf2e6 100644
---- a/lib/CMakeLists.txt
-+++ b/lib/CMakeLists.txt
-@@ -28,16 +28,6 @@ if(NOT LIBCXX_INSTALL_LIBRARY)
-   set(exclude_from_all EXCLUDE_FROM_ALL)
- endif()
- 
--if (LIBCXX_ENABLE_SHARED)
--  add_library(cxx SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
--else()
--  add_library(cxx STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
--endif()
--
--if (DEFINED LIBCXX_CXX_ABI_DEPS)
--  add_dependencies(cxx LIBCXX_CXX_ABI_DEPS)
--endif()
--
- #if LIBCXX_CXX_ABI_LIBRARY_PATH is defined we want to add it to the search path.
- add_link_flags_if(LIBCXX_CXX_ABI_LIBRARY_PATH "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")
- 
-@@ -139,18 +129,51 @@ if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR
-   endif()
- endif()
- 
--target_link_libraries(cxx ${LIBCXX_LIBRARIES})
- split_list(LIBCXX_COMPILE_FLAGS)
- split_list(LIBCXX_LINK_FLAGS)
- 
--set_target_properties(cxx
-+# Add a object library that contains the compiled source files.
-+add_library(cxx_objects OBJECT ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
-+
-+set_target_properties(cxx_objects
-   PROPERTIES
-     COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
--    LINK_FLAGS    "${LIBCXX_LINK_FLAGS}"
--    OUTPUT_NAME   "c++"
--    VERSION       "${LIBCXX_ABI_VERSION}.0"
--    SOVERSION     "${LIBCXX_ABI_VERSION}"
-+)
-+
-+set(LIBCXX_TARGETS)
-+
-+# Build the shared library.
-+if (LIBCXX_ENABLE_SHARED)
-+  add_library(cxx_shared SHARED $<TARGET_OBJECTS:cxx_objects>)
-+  target_link_libraries(cxx_shared ${LIBCXX_LIBRARIES})
-+  set_target_properties(cxx_shared
-+    PROPERTIES
-+      LINK_FLAGS    "${LIBCXX_LINK_FLAGS}"
-+      OUTPUT_NAME   "c++"
-+      VERSION       "${LIBCXX_ABI_VERSION}.0"
-+      SOVERSION     "${LIBCXX_ABI_VERSION}"
-   )
-+  list(APPEND LIBCXX_TARGETS "cxx_shared")
-+endif()
-+
-+# Build the static library.
-+if (LIBCXX_ENABLE_STATIC)
-+  add_library(cxx_static STATIC $<TARGET_OBJECTS:cxx_objects>)
-+  target_link_libraries(cxx_static ${LIBCXX_LIBRARIES})
-+  set_target_properties(cxx_static
-+    PROPERTIES
-+      LINK_FLAGS    "${LIBCXX_LINK_FLAGS}"
-+      OUTPUT_NAME   "c++"
-+  )
-+  list(APPEND LIBCXX_TARGETS "cxx_static")
-+endif()
-+
-+# Add a meta-target for both libraries.
-+add_custom_target(cxx DEPENDS ${LIBCXX_TARGETS})
-+
-+if (DEFINED LIBCXX_CXX_ABI_DEPS)
-+  add_dependencies(cxx LIBCXX_CXX_ABI_DEPS)
-+endif()
- 
- if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY)
-   file(GLOB LIBCXX_EXPERIMENTAL_SOURCES ../src/experimental/*.cpp)
-@@ -158,7 +181,11 @@ if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY)
-     file(GLOB LIBCXX_FILESYSTEM_SOURCES ../src/experimental/filesystem/*.cpp)
-   endif()
-   add_library(cxx_experimental STATIC ${LIBCXX_EXPERIMENTAL_SOURCES} ${LIBCXX_FILESYSTEM_SOURCES})
--  target_link_libraries(cxx_experimental cxx)
-+  if (LIBCXX_ENABLE_SHARED)
-+    target_link_libraries(cxx_experimental cxx_shared)
-+  else()
-+    target_link_libraries(cxx_experimental cxx_static)
-+  endif()
- 
-   set(experimental_flags "${LIBCXX_COMPILE_FLAGS}")
-   check_flag_supported(-std=c++14)
-@@ -174,7 +201,7 @@ endif()
- 
- # Generate a linker script inplace of a libc++.so symlink. Rerun this command
- # after cxx builds.
--if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
-+if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
-   # Get the name of the ABI library and handle the case where CXXABI_LIBNAME
-   # is a target name and not a library. Ex cxxabi_shared.
-   set(SCRIPT_ABI_LIBNAME "${LIBCXX_CXX_ABI_LIBRARY}")
-@@ -183,11 +210,11 @@ if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
-   endif()
-   # Generate a linker script inplace of a libc++.so symlink. Rerun this command
-   # after cxx builds.
--  add_custom_command(TARGET cxx POST_BUILD
-+  add_custom_command(TARGET cxx_shared POST_BUILD
-     COMMAND
-       ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/gen_link_script/gen_link_script.py
-     ARGS
--      "$<TARGET_LINKER_FILE:cxx>"
-+      "$<TARGET_LINKER_FILE:cxx_shared>"
-       "${SCRIPT_ABI_LIBNAME}"
-     WORKING_DIRECTORY ${LIBCXX_BUILD_DIR}
-   )
-@@ -197,13 +224,13 @@ if (LIBCXX_INSTALL_LIBRARY)
-   if (LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
-     set(experimental_lib cxx_experimental)
-   endif()
--  install(TARGETS cxx ${experimental_lib}
-+  install(TARGETS ${LIBCXX_TARGETS} ${experimental_lib}
-     LIBRARY DESTINATION lib${LIBCXX_LIBDIR_SUFFIX} COMPONENT libcxx
-     ARCHIVE DESTINATION lib${LIBCXX_LIBDIR_SUFFIX} COMPONENT libcxx
-     )
-   # NOTE: This install command must go after the cxx install command otherwise
-   # it will not be executed after the library symlinks are installed.
--  if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
-+  if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
-     # Replace the libc++ filename with $<TARGET_LINKER_FILE:cxx>
-     # after we required CMake 3.0.
-     install(FILES "${LIBCXX_LIBRARY_DIR}/libc++${CMAKE_SHARED_LIBRARY_SUFFIX}"
--- 
-2.4.10
-

diff --git a/sys-libs/libcxx/files/prepare_snapshot.sh b/sys-libs/libcxx/files/prepare_snapshot.sh
deleted file mode 100755
index 3de5a97a809..00000000000
--- a/sys-libs/libcxx/files/prepare_snapshot.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-VERSION=$(date +%Y%m%d)
-BASE_VERSION="0.0"
-PACKAGE="libcxx-${BASE_VERSION}_p${VERSION}"
-
-svn co http://llvm.org/svn/llvm-project/libcxx/trunk ${PACKAGE}
-
-find "${PACKAGE}" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf
-find "${PACKAGE}" -type d -name '.git' -prune -print0 | xargs -0 rm -rf
-
-tar cJf ${PACKAGE}.tar.xz ${PACKAGE}
-rm -rf ${PACKAGE}/
-
-echo "Tarball: \"${PACKAGE}.tar.xz\""
-
-echo "** all done **"

diff --git a/sys-libs/libcxx/libcxx-3.7.1.ebuild b/sys-libs/libcxx/libcxx-3.7.1.ebuild
deleted file mode 100644
index c0caf08e81c..00000000000
--- a/sys-libs/libcxx/libcxx-3.7.1.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-ESVN_REPO_URI="https://llvm.org/svn/llvm-project/libcxx/trunk"
-
-[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
-
-inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-if [ "${PV%9999}" = "${PV}" ] ; then
-	SRC_URI="https://llvm.org/releases/${PV}/${P}.src.tar.xz"
-	S="${WORKDIR}/${P}.src"
-else
-	SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [ "${PV%9999}" = "${PV}" ] ; then
-	KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
-	KEYWORDS=""
-fi
-IUSE="elibc_glibc +libcxxrt +static-libs test"
-
-RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
-	!libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )"
-DEPEND="${RDEPEND}
-	test? ( sys-devel/clang )
-	app-arch/xz-utils"
-
-DOCS=( CREDITS.TXT )
-
-pkg_setup() {
-	if ! use libcxxrt ; then
-		ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
-		ewarn "libsupc++. Please note that this is not well supported."
-		ewarn "In particular, static linking will not work."
-	fi
-	if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
-		eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
-		eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-		die
-	fi
-}
-
-src_prepare() {
-	cp -f "${FILESDIR}/Makefile" lib/ || die
-	multilib_copy_sources
-}
-
-src_configure() {
-	export LIBS="-lpthread -lrt -lc -lgcc_s"
-	if use libcxxrt ; then
-		append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
-		LIBS="-lcxxrt ${LIBS}"
-		cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
-	else
-		# Very hackish, see $HOMEPAGE
-		# If someone has a clever idea, please share it!
-		local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')"
-		local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
-		append-cppflags -D__GLIBCXX__ ${includes}
-		LIBS="-lsupc++ ${LIBS}"
-		local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h"
-		for i in ${libsupcxx_includes} ; do
-			local found=""
-			[ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
-			for j in ${libcxx_gcc_dirs} ; do
-				if [ -f "${j}/${i}" ] ; then
-					cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
-					found=yes
-				fi
-			done
-			[ -n "${found}" ] || die "Header not found: ${i}"
-		done
-	fi
-
-	tc-export AR CC CXX
-
-	append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
-}
-
-multilib_src_compile() {
-	cd "${BUILD_DIR}/lib" || die
-	emake shared
-	use static-libs && emake static
-}
-
-# Tests fail for now, if anybody is able to fix them, help is very welcome.
-multilib_src_test() {
-	cd "${BUILD_DIR}/test"
-	LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
-		CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
-		HEADER_INCLUDE="-I${BUILD_DIR}/include" \
-		SOURCE_LIB="-L${BUILD_DIR}/lib" \
-		LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
-		./testit || die
-	# TODO: fix link against libsupc++
-}
-
-# Usage: deps
-gen_ldscript() {
-	local output_format
-	output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
-	[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
-	cat <<-END_LDSCRIPT
-/* GNU ld script
-   Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
-	if use libcxxrt ; then
-		# Move it first.
-		mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
-
-		# Generate libc++.a ldscript for inclusion of its dependencies so that
-		# clang++ -stdlib=libc++ -static works out of the box.
-		local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
-		# On Linux/glibc it does not link without libpthread or libdl. It is
-		# fine on FreeBSD.
-		use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
-
-		gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
-	fi
-	# TODO: Generate a libc++.a ldscript when building against libsupc++
-}
-
-gen_shared_ldscript() {
-	if use libcxxrt ; then
-		mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
-		local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
-		gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
-	fi
-	# TODO: Generate the linker script for other confiurations too.
-}
-
-multilib_src_install() {
-	cd "${BUILD_DIR}/lib"
-	if use static-libs ; then
-		dolib.a libc++.a
-		gen_static_ldscript
-	fi
-	dolib.so libc++.so*
-	gen_shared_ldscript
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	insinto /usr/include/c++/v1
-	doins -r include/*
-}
-
-pkg_postinst() {
-	elog "This package (${PN}) is mainly intended as a replacement for the C++"
-	elog "standard library when using clang."
-	elog "To use it, instead of libstdc++, use:"
-	elog "    clang++ -stdlib=libc++"
-	elog "to compile your C++ programs."
-}

diff --git a/sys-libs/libcxx/libcxx-3.9.1.ebuild b/sys-libs/libcxx/libcxx-3.9.1.ebuild
deleted file mode 100644
index d5282680825..00000000000
--- a/sys-libs/libcxx/libcxx-3.9.1.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# Ninja provides better scalability and cleaner verbose output, and is used
-# throughout all LLVM projects.
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-EGIT_REPO_URI="https://llvm.org/git/libcxx.git
-	https://github.com/llvm-mirror/libcxx.git"
-PYTHON_COMPAT=( python2_7 )
-
-[[ ${PV} == 9999 ]] && SCM="git-r3" || SCM=""
-
-inherit ${SCM} cmake-multilib python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-if [[ ${PV} != 9999 ]] ; then
-	SRC_URI="https://llvm.org/releases/${PV}/${P}.src.tar.xz"
-	S="${WORKDIR}/${P}.src"
-else
-	SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [[ ${PV} != 9999 ]] ; then
-	KEYWORDS="amd64 ~arm64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
-	KEYWORDS="amd64 ~arm64 x86"
-fi
-IUSE="elibc_glibc elibc_musl libcxxabi +libcxxrt libunwind +static-libs test"
-REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) )
-	?? ( libcxxabi libcxxrt )"
-
-RDEPEND="
-	libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
-	libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
-	!libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )"
-# llvm-3.9.0 needed because its cmake files installation path changed, which is
-# needed by libcxx
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
-	test? ( >=sys-devel/clang-3.9.0
-		$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
-	app-arch/xz-utils
-	>=sys-devel/llvm-3.9.0"
-
-DOCS=( CREDITS.TXT )
-
-PATCHES=(
-	# Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
-	# out-of-tree build.
-	"${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-
-	# Back-port of https://reviews.llvm.org/D23232, allowing building both
-	# shared and static libs in one run.
-	"${FILESDIR}/${PN}-3.9-cmake-static-lib.patch"
-)
-
-python_check_deps() {
-	has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-
-	if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then
-		eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
-		eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
-		eerror "and try again."
-		die
-	fi
-	if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then
-		eerror "${PN} needs to be built with gcc-4.7 or later (or other"
-		eerror "conformant compilers). Please use gcc-config to switch to"
-		eerror "gcc-4.7 or later version."
-		die
-	fi
-}
-
-src_configure() {
-	NATIVE_LIBDIR=$(get_libdir)
-	cmake-multilib_src_configure
-}
-
-src_configure() {
-	# note: we need to do this before multilib kicks in since it will
-	# alter the CHOST
-	local cxxabi cxxabi_incs
-	if use libcxxabi; then
-		cxxabi=libcxxabi
-		cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
-	elif use libcxxrt; then
-		cxxabi=libcxxrt
-		cxxabi_incs="${EPREFIX}/usr/include/libcxxrt"
-	else
-		local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
-		cxxabi=libsupc++
-		cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	# we want -lgcc_s for unwinder, and for compiler runtime when using
-	# gcc, clang with gcc runtime (or any unknown compiler)
-	local extra_libs=() want_gcc_s=ON
-	if use libunwind; then
-		# work-around missing -lunwind upstream
-		extra_libs+=( -lunwind )
-		# if we're using libunwind and clang with compiler-rt, we want
-		# to link to compiler-rt instead of -lgcc_s
-		if tc-is-clang; then
-			# get the full library list out of 'pretend mode'
-			# and grep it for libclang_rt references
-			local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
-			local i
-			for i in "${args[@]}"; do
-				if [[ ${i} == *libclang_rt* ]]; then
-					want_gcc_s=OFF
-					extra_libs+=( "${i}" )
-				fi
-			done
-		fi
-	fi
-
-	local libdir=$(get_libdir)
-	local mycmakeargs=(
-		# LLVM_LIBDIR_SUFFIX is used to find CMake files
-		# and we are happy to use the native set
-		-DLLVM_LIBDIR_SUFFIX=${NATIVE_LIBDIR#lib}
-		-DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
-		-DLIBCXX_ENABLE_SHARED=ON
-		-DLIBCXX_ENABLE_STATIC=$(usex static-libs)
-		-DLIBCXX_CXX_ABI=${cxxabi}
-		-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
-		# we're using our own mechanism for generating linker scripts
-		-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
-		-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-		-DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
-		-DLIBCXX_INCLUDE_TESTS=$(usex test)
-		-DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
-	)
-
-	if use test; then
-		mycmakeargs+=(
-			# this can be any directory, it just needs to exist...
-			-DLLVM_MAIN_SRC_DIR="${T}"
-			-DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
-		)
-	fi
-	cmake-utils_src_configure
-}
-
-multilib_src_test() {
-	local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
-
-	[[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-	sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
-
-	cmake-utils_src_make check-libcxx
-}
-
-# Usage: deps
-gen_ldscript() {
-	local output_format
-	output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
-	[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
-	cat <<-END_LDSCRIPT
-/* GNU ld script
-   Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
-	local libdir=$(get_libdir)
-	local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")")
-
-	# Move it first.
-	mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
-	# Generate libc++.a ldscript for inclusion of its dependencies so that
-	# clang++ -stdlib=libc++ -static works out of the box.
-	local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
-	# On Linux/glibc it does not link without libpthread or libdl. It is
-	# fine on FreeBSD.
-	use elibc_glibc && deps+=" libpthread.a libdl.a"
-
-	gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
-	local libdir=$(get_libdir)
-	# libsupc++ doesn't have a shared version
-	local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")")
-
-	mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
-	local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
-	gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
-	cmake-utils_src_install
-	gen_shared_ldscript
-	use static-libs && gen_static_ldscript
-}
-
-pkg_postinst() {
-	elog "This package (${PN}) is mainly intended as a replacement for the C++"
-	elog "standard library when using clang."
-	elog "To use it, instead of libstdc++, use:"
-	elog "    clang++ -stdlib=libc++"
-	elog "to compile your C++ programs."
-}

diff --git a/sys-libs/libcxx/libcxx-4.0.1.ebuild b/sys-libs/libcxx/libcxx-4.0.1.ebuild
deleted file mode 100644
index 4273ce8d76e..00000000000
--- a/sys-libs/libcxx/libcxx-4.0.1.ebuild
+++ /dev/null
@@ -1,213 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# Ninja provides better scalability and cleaner verbose output, and is used
-# throughout all LLVM projects.
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-# (needed due to CMAKE_BUILD_TYPE != Gentoo)
-CMAKE_MIN_VERSION=3.7.0-r1
-PYTHON_COMPAT=( python2_7 )
-
-inherit cmake-multilib llvm python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 x86"
-IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test"
-REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) )
-	?? ( libcxxabi libcxxrt )"
-
-RDEPEND="
-	libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
-	libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
-	!libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )"
-# LLVM 4 required for llvm-config --cmakedir
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
-	test? ( >=sys-devel/clang-3.9.0
-		$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
-	app-arch/xz-utils
-	>=sys-devel/llvm-4"
-
-S=${WORKDIR}/${P/_/}.src
-
-DOCS=( CREDITS.TXT )
-
-PATCHES=(
-	# Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
-	# out-of-tree build.
-	"${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-)
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-python_check_deps() {
-	has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	llvm_pkg_setup
-	use test && python-any-r1_pkg_setup
-
-	if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then
-		eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
-		eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
-		eerror "and try again."
-		die
-	fi
-	if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then
-		eerror "${PN} needs to be built with gcc-4.7 or later (or other"
-		eerror "conformant compilers). Please use gcc-config to switch to"
-		eerror "gcc-4.7 or later version."
-		die
-	fi
-}
-
-src_configure() {
-	# note: we need to do this before multilib kicks in since it will
-	# alter the CHOST
-	local cxxabi cxxabi_incs
-	if use libcxxabi; then
-		cxxabi=libcxxabi
-		cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
-	elif use libcxxrt; then
-		cxxabi=libcxxrt
-		cxxabi_incs="${EPREFIX}/usr/include/libcxxrt"
-	else
-		local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
-		cxxabi=libsupc++
-		cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	# we want -lgcc_s for unwinder, and for compiler runtime when using
-	# gcc, clang with gcc runtime (or any unknown compiler)
-	local extra_libs=() want_gcc_s=ON
-	if use libunwind; then
-		# work-around missing -lunwind upstream
-		extra_libs+=( -lunwind )
-		# if we're using libunwind and clang with compiler-rt, we want
-		# to link to compiler-rt instead of -lgcc_s
-		if tc-is-clang; then
-			# get the full library list out of 'pretend mode'
-			# and grep it for libclang_rt references
-			local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
-			local i
-			for i in "${args[@]}"; do
-				if [[ ${i} == *libclang_rt* ]]; then
-					want_gcc_s=OFF
-					extra_libs+=( "${i}" )
-				fi
-			done
-		fi
-	fi
-
-	local libdir=$(get_libdir)
-	local mycmakeargs=(
-		-DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
-		-DLIBCXX_ENABLE_SHARED=ON
-		-DLIBCXX_ENABLE_STATIC=$(usex static-libs)
-		-DLIBCXX_CXX_ABI=${cxxabi}
-		-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
-		# we're using our own mechanism for generating linker scripts
-		-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
-		-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-		-DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
-		-DLIBCXX_INCLUDE_TESTS=$(usex test)
-		-DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
-	)
-
-	if use test; then
-		mycmakeargs+=(
-			# this can be any directory, it just needs to exist...
-			# FIXME: remove this once https://reviews.llvm.org/D25093 is merged
-			-DLLVM_MAIN_SRC_DIR="${T}"
-		)
-		if has_version '>=sys-devel/llvm-6'; then
-			mycmakeargs+=(
-				-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			)
-		else
-			mycmakeargs+=(
-				-DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
-			)
-		fi
-	fi
-	cmake-utils_src_configure
-}
-
-multilib_src_test() {
-	local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
-
-	[[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-	sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
-
-	cmake-utils_src_make check-libcxx
-}
-
-# Usage: deps
-gen_ldscript() {
-	local output_format
-	output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
-	[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
-	cat <<-END_LDSCRIPT
-/* GNU ld script
-   Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
-	local libdir=$(get_libdir)
-	local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")")
-
-	# Move it first.
-	mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
-	# Generate libc++.a ldscript for inclusion of its dependencies so that
-	# clang++ -stdlib=libc++ -static works out of the box.
-	local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
-	# On Linux/glibc it does not link without libpthread or libdl. It is
-	# fine on FreeBSD.
-	use elibc_glibc && deps+=" libpthread.a libdl.a"
-
-	gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
-	local libdir=$(get_libdir)
-	# libsupc++ doesn't have a shared version
-	local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")")
-
-	mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
-	local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
-	gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
-	cmake-utils_src_install
-	gen_shared_ldscript
-	use static-libs && gen_static_ldscript
-}
-
-pkg_postinst() {
-	elog "This package (${PN}) is mainly intended as a replacement for the C++"
-	elog "standard library when using clang."
-	elog "To use it, instead of libstdc++, use:"
-	elog "    clang++ -stdlib=libc++"
-	elog "to compile your C++ programs."
-}

diff --git a/sys-libs/libcxx/libcxx-5.0.2.ebuild b/sys-libs/libcxx/libcxx-5.0.2.ebuild
deleted file mode 100644
index eda78625c06..00000000000
--- a/sys-libs/libcxx/libcxx-5.0.2.ebuild
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# Ninja provides better scalability and cleaner verbose output, and is used
-# throughout all LLVM projects.
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-# (needed due to CMAKE_BUILD_TYPE != Gentoo)
-CMAKE_MIN_VERSION=3.7.0-r1
-PYTHON_COMPAT=( python2_7 )
-
-inherit cmake-multilib llvm python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 x86"
-IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test"
-REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) )
-	?? ( libcxxabi libcxxrt )"
-
-RDEPEND="
-	libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
-	libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
-	!libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )"
-# LLVM 4 required for llvm-config --cmakedir
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
-	test? ( >=sys-devel/clang-3.9.0
-		$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
-	app-arch/xz-utils
-	>=sys-devel/llvm-4"
-
-S=${WORKDIR}/${P/_/}.src
-
-DOCS=( CREDITS.TXT )
-
-PATCHES=(
-	# Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
-	# out-of-tree build.
-	"${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-)
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-python_check_deps() {
-	has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	llvm_pkg_setup
-	use test && python-any-r1_pkg_setup
-
-	if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then
-		eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
-		eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
-		eerror "and try again."
-		die
-	fi
-	if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then
-		eerror "${PN} needs to be built with gcc-4.7 or later (or other"
-		eerror "conformant compilers). Please use gcc-config to switch to"
-		eerror "gcc-4.7 or later version."
-		die
-	fi
-}
-
-src_configure() {
-	# note: we need to do this before multilib kicks in since it will
-	# alter the CHOST
-	local cxxabi cxxabi_incs
-	if use libcxxabi; then
-		cxxabi=libcxxabi
-		cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
-	elif use libcxxrt; then
-		cxxabi=libcxxrt
-		cxxabi_incs="${EPREFIX}/usr/include/libcxxrt"
-	else
-		local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
-		cxxabi=libsupc++
-		cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	# we want -lgcc_s for unwinder, and for compiler runtime when using
-	# gcc, clang with gcc runtime (or any unknown compiler)
-	local extra_libs=() want_gcc_s=ON
-	if use libunwind; then
-		# work-around missing -lunwind upstream
-		extra_libs+=( -lunwind )
-		# if we're using libunwind and clang with compiler-rt, we want
-		# to link to compiler-rt instead of -lgcc_s
-		if tc-is-clang; then
-			local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
-			   ${LDFLAGS} -print-libgcc-file-name)
-			if [[ ${compiler_rt} == *libclang_rt* ]]; then
-				want_gcc_s=OFF
-				extra_libs+=( "${compiler_rt}" )
-			fi
-		fi
-	fi
-
-	local libdir=$(get_libdir)
-	local mycmakeargs=(
-		-DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
-		-DLIBCXX_ENABLE_SHARED=ON
-		-DLIBCXX_ENABLE_STATIC=$(usex static-libs)
-		-DLIBCXX_CXX_ABI=${cxxabi}
-		-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
-		# we're using our own mechanism for generating linker scripts
-		-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
-		-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-		-DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
-		-DLIBCXX_INCLUDE_TESTS=$(usex test)
-		-DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
-	)
-
-	if use test; then
-		mycmakeargs+=(
-			# this can be any directory, it just needs to exist...
-			# FIXME: remove this once https://reviews.llvm.org/D25093 is merged
-			-DLLVM_MAIN_SRC_DIR="${T}"
-		)
-		if has_version '>=sys-devel/llvm-6'; then
-			mycmakeargs+=(
-				-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			)
-		else
-			mycmakeargs+=(
-				-DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
-			)
-		fi
-	fi
-	cmake-utils_src_configure
-}
-
-multilib_src_test() {
-	local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
-
-	[[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-	sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
-
-	cmake-utils_src_make check-libcxx
-}
-
-# Usage: deps
-gen_ldscript() {
-	local output_format
-	output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
-	[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
-	cat <<-END_LDSCRIPT
-/* GNU ld script
-   Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
-	local libdir=$(get_libdir)
-	local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")")
-
-	# Move it first.
-	mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
-	# Generate libc++.a ldscript for inclusion of its dependencies so that
-	# clang++ -stdlib=libc++ -static works out of the box.
-	local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
-	# On Linux/glibc it does not link without libpthread or libdl. It is
-	# fine on FreeBSD.
-	use elibc_glibc && deps+=" libpthread.a libdl.a"
-
-	gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
-	local libdir=$(get_libdir)
-	# libsupc++ doesn't have a shared version
-	local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")")
-
-	mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
-	local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
-	gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
-	cmake-utils_src_install
-	gen_shared_ldscript
-	use static-libs && gen_static_ldscript
-}
-
-pkg_postinst() {
-	elog "This package (${PN}) is mainly intended as a replacement for the C++"
-	elog "standard library when using clang."
-	elog "To use it, instead of libstdc++, use:"
-	elog "    clang++ -stdlib=libc++"
-	elog "to compile your C++ programs."
-}


             reply	other threads:[~2019-03-10 19:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-10 19:53 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-18 21:43 [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxx/, sys-libs/libcxx/files/ Michał Górny
2016-10-03  8:51 Alexis Ballier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1552247576.4457b2c99d536fc44e945e43f8fd7fbe09a0df60.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox