summaryrefslogtreecommitdiff
path: root/sys-libs/libcxx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
commitb7b97785ebbb2f11d24d14dab8b81ed274f4ce6a (patch)
tree9fd110f9fc996e8a4213eeda994a8c112491b86d /sys-libs/libcxx
parent066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (diff)
gentoo resync : 19.03.2019
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r--sys-libs/libcxx/Manifest18
-rw-r--r--sys-libs/libcxx/files/Makefile38
-rw-r--r--sys-libs/libcxx/files/libcxx-3.9-cmake-static-lib.patch196
-rw-r--r--sys-libs/libcxx/files/libcxx-7.0.0-libsupcxx-install.patch32
-rwxr-xr-xsys-libs/libcxx/files/prepare_snapshot.sh16
-rw-r--r--sys-libs/libcxx/libcxx-3.7.1.ebuild169
-rw-r--r--sys-libs/libcxx/libcxx-3.9.1.ebuild222
-rw-r--r--sys-libs/libcxx/libcxx-4.0.1.ebuild213
-rw-r--r--sys-libs/libcxx/libcxx-5.0.2.ebuild209
-rw-r--r--sys-libs/libcxx/libcxx-8.0.0_rc3.ebuild215
-rw-r--r--sys-libs/libcxx/libcxx-8.0.0_rc5.ebuild (renamed from sys-libs/libcxx/libcxx-8.0.0_rc2.ebuild)0
11 files changed, 2 insertions, 1326 deletions
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 2f5b0c08137f..8191ae281b3e 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -1,25 +1,11 @@
-AUX Makefile 874 BLAKE2B 67203d8f3223422b1ca2f4af614c0bf7e6c7658c93b206ccf3a3c978510e4ad4e5ad11ee1aea8fa27d2cfd560b553f475a24ccff1b547051918cbeda1951305c SHA512 96eef2e897075bc7d9fc799ce6c54f6a33ee917efd5666376ac578cb16e15d965205630dbd076f92a3a7091d58ecc235e37bc327c211bf3594244981f089135f
AUX libcxx-3.9-cmake-link-flags.patch 1014 BLAKE2B 8e86059e00a5ebcd7a1528882876607c80ab14bcd0ebf2c8dbec87f71a48761e6433ff94db92b41192edb6e3cc74972cd9fb518f18a657229bd30afa3a65bdf8 SHA512 5df85c66bf865900197effe3905976bf165b4c4d79b8d14352753f6baca93ab5dc26bf735fd9478a0c13df489b860d8b629240134b7e26be6233138ea95dbab3
-AUX libcxx-3.9-cmake-static-lib.patch 7507 BLAKE2B ee900dc9409a24fbacceb1a74c9728995662a7b04d3df248c2cae433196e7e8e1bf984b19539249d6b14e29243f835176089f04241f0e7a577346968d703eb56 SHA512 435c14edfb7bca9ef35fa1e9e44ab9655d5b47e373e6437839027b6d56894a37dfb0f228cce062d84aaaf60677d9435b2cdee2c9248b4f25cf3f6890ec353f46
-AUX libcxx-7.0.0-libsupcxx-install.patch 1217 BLAKE2B 2f931095e638a4b7e4778233258d96b116e47be316106fca92e2f8762536af3ebcc6a084c1a78b4549bad91fcbb1ff5952b4f380b791ff58744519adea74ea8b SHA512 f370c84acafcf1ed5a5891af362e37f8107673e564052c200a0e6c3a7a0a551a7fa7d8f2eb173035909e37cfdef8b33cc121aa53a3807f2e33953e68656e2c2c
-AUX prepare_snapshot.sh 427 BLAKE2B 373ff29ec8da6e650d00f229fceeb171afacd6d66fe4abc86026410bf41ed6d3a4b5db5471fb54350cbeb0ea909e3e51404c6513a779328afc8a8f8db637deb1 SHA512 ebac2a467f8b1dfb68f1dc46a35f8294d1cf74b70be2a008217fa13b3366ddf4a9f2ebbe611cd63824f42305c5c0304aac2f46386b2956c9e07d82d5d984b435
-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
-DIST libcxx-8.0.0rc3.src.tar.xz 1755192 BLAKE2B 32d0602a13a273f396f139dd25f67ed0a12881c618eef35e0bb9b6d8d8cb786f130ce3ce7e8027f8f2a2516de5d1f9753bc12e81497a0bc919731866da04dba2 SHA512 f59e6fdd20d18cfb39c426eadcda5a611dc79735fc1fc8c4cebd4106afa35736ceb3500bba7f162bccced1964785fc18c129e9bb68dd6549b205cae14cd46f8b
-EBUILD libcxx-3.7.1.ebuild 5335 BLAKE2B 6f4dbbb8dbc7f6e8b97f05ff3e638bb037bad416feffe5207a9cba166a5c0e0c92c3cac954088cc04cdf2a9be62f17cd5d7ece472e4e20d3c0be5b3c1edb2f52 SHA512 f4e04906e7205cd3d2f3180a0b897c1a9eaf5c65249bdbb62ed32a0455132009c88ae6f080b52abe6973752073ca3bc32e37e3491db9de2fc030cf77e4ed91b0
-EBUILD libcxx-3.9.1.ebuild 6954 BLAKE2B 041f1c1cbf105eace82b9d14ff2c4d1fbb55370cc0194896bf8a9ff2f43f9c2cab698402d0fc3833a0a73c09d8a4d76aed30133e3e36058aaf375112561484e7 SHA512 d8d080cd668a1d8833b1555def2d6383b63169e1091c54941f13707099627829246e70c94e8b070e429faab0b80b635e4a52b1a376eae110f7d818266b59937e
-EBUILD libcxx-4.0.1.ebuild 6592 BLAKE2B 79d1934e18efc7a221e235c372b15e13f71c0d58e41294385f1eaef39b9602336119aa6c1ca0ec608ee6497df14e3bcac9608cb8a01cb1f062eafcf7661145ce SHA512 a7cccd1799c55897ba0d116ef1cfeffe56d553429ea73618692b72de52e5d63d25417b518f0c9b2d96c30e7f6d0ed481d8e4d9d53046fe598f45de7473198c14
-EBUILD libcxx-5.0.2.ebuild 6502 BLAKE2B d6b0b4b2fc3ca56858c2b785da51187964074d55d5e9a1e2f7c4b6c41f4a819f7548cf56cff9977e1f65afbf4e9c1c6a699b44d6188d16c0aa0f3a5c0795790f SHA512 05bd5dd8bae0fae0f18bd69bd328482d8fea2004a70bbab72a3600c9c20071dd5108bee4ad770403594e7aa10e393783cc6703ccd279755383b58afcfbbce3ab
+DIST libcxx-8.0.0rc5.src.tar.xz 1755168 BLAKE2B ec3e77fc15d92d4a2e04b706b52379e2f5fefbdd00e6f1bd63061c42781330b279507e690f2f14185e18893bb7b985251e68b5282b26b4c20afbed671d35073b SHA512 aaf6495ea7ddf68441aa4422ca7d0d02f17875553f34010d1e5061a5180774990b227edc6fe133dd4081de7e4f835228ac286b974800fd396b3650c4f7899b7a
EBUILD libcxx-6.0.1.ebuild 6746 BLAKE2B 616128b9d49049ac6de90b84f89a48c7033f5927edc5e15674df5e3a2225630f59a99c8047c71d9128304d726241ceaa1cefabf8d44e4b2d6a491611f63bee88 SHA512 3df9e7e79b62893441212fe7baa51190ac69f0bf64332718ae53596a043dc3583b8125bbcf7339cca7cf9937aa870ea0d8b12670700962c1cb22892f706e3129
EBUILD libcxx-7.0.1.ebuild 6750 BLAKE2B 0052def7166376e81fdc4126220bc6749113e43b2fd66f6e447e020f6bbb6b63b7519e3656c79793837c5b105e2606f34b1d23e78bf4dcd2c892f79cc32b2101 SHA512 f16905c20b669428f1378185072563f855ed03520057039ba794fc717f0ca2cc44bc1c1a78aa24bca688946d5a32e2843163198e4085396e668f4c695f5e61e7
EBUILD libcxx-7.0.9999.ebuild 7047 BLAKE2B eb80753b38042cdb3ae3f01db2c4dc9bc7a588e00bcf1d7da85d3c30c73e941bbc1096d9b6be67c21dd47874354f909255a843371cb0fe9f479ee09d3439b292 SHA512 ae81c9c856f39dfef3dec1e66decab8b20987eb82c4093b6bfda2937c5111bc6a24058f95a92b3a3beb0b91df6f5bb83216ff4997a0be8fd7d28b8f29f91290f
-EBUILD libcxx-8.0.0_rc2.ebuild 6753 BLAKE2B 15d589d9bf7aa4c4d73813e85e91be404515e5b0ffe1f66dbce944fd0edbeace43f654a6acfb6f80c848d6eb19e6fa5c67141dca10ecbbfa95b0ad6dbcd3c3a5 SHA512 7acb9d21c888176b523b54ea86e87aa085deb82983aa8b946d7625a13931214b6e38cfa4325f4f42d3601c631e99080a43fcf706b5a86036a550de089ca96a12
-EBUILD libcxx-8.0.0_rc3.ebuild 6753 BLAKE2B 15d589d9bf7aa4c4d73813e85e91be404515e5b0ffe1f66dbce944fd0edbeace43f654a6acfb6f80c848d6eb19e6fa5c67141dca10ecbbfa95b0ad6dbcd3c3a5 SHA512 7acb9d21c888176b523b54ea86e87aa085deb82983aa8b946d7625a13931214b6e38cfa4325f4f42d3601c631e99080a43fcf706b5a86036a550de089ca96a12
+EBUILD libcxx-8.0.0_rc5.ebuild 6753 BLAKE2B 15d589d9bf7aa4c4d73813e85e91be404515e5b0ffe1f66dbce944fd0edbeace43f654a6acfb6f80c848d6eb19e6fa5c67141dca10ecbbfa95b0ad6dbcd3c3a5 SHA512 7acb9d21c888176b523b54ea86e87aa085deb82983aa8b946d7625a13931214b6e38cfa4325f4f42d3601c631e99080a43fcf706b5a86036a550de089ca96a12
EBUILD libcxx-8.0.9999.ebuild 7044 BLAKE2B 12185d3065a0cdecf4b6eb2c7eca5f70a2a1732214c77c4e695418ffe5bb39273342088fa4cba2504a411db8ecc8543d219a932d5f022383197df7d4b84b1e1e SHA512 57f565cb1652c53e08ba21776dcf1707061697937533c5e447bcff37cdf274f54525ff59112a1bf54a25d39477e20f0dc7dbdf4ad71846266c06a0002d1c0980
EBUILD libcxx-9999.ebuild 7019 BLAKE2B ea929ac8759c5b70e48fe32ade6ef24c2ce8830be6bb5a35411a654212c7b2d127ecaa2a94bebbbb01807ff57c7d814379f23047c206d265d917958478df54b6 SHA512 5dddc6b30accff0ad414953ec2cd177ee5b151106282113687a2977c00b1a85e7151f772000118d341d0074ae91875b8ef1bd0e03de1816875bcd289b03d14ef
MISC metadata.xml 854 BLAKE2B f731ffbb07722face32cfe5ef0576c572fc45d93e8d78ec4adb46c43b95999dc4eb48f20311517fe08a397f2e5dec56c530bb6787a058358cfd1af8d79ffad90 SHA512 8ef3feab266e09442a42baced2d72667fa8b1290624c2c84bab7b173ead72669568847f6e995388fc1d7bc722381f60805d87b2a0cc2d04ae0c49e36bec3802a
diff --git a/sys-libs/libcxx/files/Makefile b/sys-libs/libcxx/files/Makefile
deleted file mode 100644
index 029e7295b889..000000000000
--- 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 5f0e31864dfd..000000000000
--- 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/libcxx-7.0.0-libsupcxx-install.patch b/sys-libs/libcxx/files/libcxx-7.0.0-libsupcxx-install.patch
deleted file mode 100644
index 35b04e253e61..000000000000
--- a/sys-libs/libcxx/files/libcxx-7.0.0-libsupcxx-install.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 84f960980e5bbaf136bc130cb385379b8f610335 Mon Sep 17 00:00:00 2001
-From: Petr Hosek <phosek@chromium.org>
-Date: Thu, 4 Oct 2018 05:38:53 +0000
-Subject: [PATCH] [CMake] Use just basename when copying C++ ABI headers
-
-This avoids duplicate directories when the filename includes path.
-
-Fixes PR39145
-
-Differential Revision: https://reviews.llvm.org/D52762
-
-git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343753 91177308-0d34-0410-b5e6-96231b3b80d8
----
- cmake/Modules/HandleLibCXXABI.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
-index ef3b4f5dd..1c19d7e01 100644
---- a/cmake/Modules/HandleLibCXXABI.cmake
-+++ b/cmake/Modules/HandleLibCXXABI.cmake
-@@ -41,7 +41,7 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
- get_filename_component(ifile ${fpath} NAME)
- set(src ${incpath}/${fpath})
-
-- set(dst ${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}/${fpath})
-+ set(dst ${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}/${ifile})
- add_custom_command(OUTPUT ${dst}
- DEPENDS ${src}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
---
-2.19.0
-
diff --git a/sys-libs/libcxx/files/prepare_snapshot.sh b/sys-libs/libcxx/files/prepare_snapshot.sh
deleted file mode 100755
index 3de5a97a8096..000000000000
--- 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 c0caf08e81ca..000000000000
--- 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 d5282680825b..000000000000
--- 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 4273ce8d76ec..000000000000
--- 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 eda78625c067..000000000000
--- 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."
-}
diff --git a/sys-libs/libcxx/libcxx-8.0.0_rc3.ebuild b/sys-libs/libcxx/libcxx-8.0.0_rc3.ebuild
deleted file mode 100644
index 4e0e73c96b4a..000000000000
--- a/sys-libs/libcxx/libcxx-8.0.0_rc3.ebuild
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# 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 multiprocessing python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-SRC_URI="https://prereleases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-fbsd"
-IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test"
-REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) )
- ?? ( libcxxabi libcxxrt )"
-RESTRICT="!test? ( test )"
-
-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-6 for new lit options
-# 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-6"
-
-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
-}
-
-test_compiler() {
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-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
-
- # bootstrap: cmake is unhappy if compiler can't link to stdlib
- local nolib_flags=( -nodefaultlibs -lc )
- if ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
- 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
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
-
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
- )
- fi
- cmake-utils_src_configure
-}
-
-multilib_src_test() {
- 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-8.0.0_rc2.ebuild b/sys-libs/libcxx/libcxx-8.0.0_rc5.ebuild
index 4e0e73c96b4a..4e0e73c96b4a 100644
--- a/sys-libs/libcxx/libcxx-8.0.0_rc2.ebuild
+++ b/sys-libs/libcxx/libcxx-8.0.0_rc5.ebuild