Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxx/
Date: Sun, 30 Dec 2018 11:40:01
Message-Id: 1546169980.4ffab3a9d0d9f367888eb284061896aee1a46fe9.mgorny@gentoo
1 commit: 4ffab3a9d0d9f367888eb284061896aee1a46fe9
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 30 11:32:06 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 30 11:39:40 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ffab3a9
7
8 sys-libs/libcxx: Remove 7.0.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/libcxx/Manifest | 1 -
13 sys-libs/libcxx/libcxx-7.0.0.ebuild | 219 ------------------------------------
14 2 files changed, 220 deletions(-)
15
16 diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
17 index 4e94af73c75..4a37419557d 100644
18 --- a/sys-libs/libcxx/Manifest
19 +++ b/sys-libs/libcxx/Manifest
20 @@ -3,5 +3,4 @@ DIST libcxx-3.9.1.src.tar.xz 1209020 BLAKE2B 510e77c2c1163babbba904933f441e8720b
21 DIST libcxx-4.0.1.src.tar.xz 1446380 BLAKE2B cd871eff4c4ca25a1fe4d27f778e913fe536a0b5863ea7dd3c8895f6b743b6f039e4df71f9ba5124c98761a8099666f68e1dfd073b5ec7b9fe0007ef09a9117d SHA512 91f3f397be606989be99865d0b279557f9afb93f7a74ed10c3a74f4440e38b5694ddf452bbf2f487cacd4391606dd5c7edfe5130f2de19e2acfd6cce619d028a
22 DIST libcxx-5.0.2.src.tar.xz 1530908 BLAKE2B e0c47d6803668267a71c75df873a136a2c3bec3732a08c365107b286f6dfef883edb81f9f4d22a0f312228865528bf1f15450c41803f8d3a8c8081fe12b62c25 SHA512 c77e0ea6bb3dc03270312de4a24fdd0d027448b2e182af31489031fd52f0997377c9049769930b80b2ba0062fe21317d8ae823c5e80e12128f8ae8e6f171be22
23 DIST libcxx-6.0.1.src.tar.xz 1552328 BLAKE2B 65a6addd04e530c2a72e8cba207282b9e9fafc01a594d7b11f63d10b6f88eca67a3cdf90b8055e410ede358d9be1f63fbe427f308e1337833447c0260d96e1c8 SHA512 c04f628b0924d76f035f615b59d19ce42dfc19c9a8eea4fe2b22a95cfe5a037ebdb30943fd741443939df5b4cf692bc1e51c840fefefbd134e3afbe2a75fe875
24 -DIST libcxx-7.0.0.src.tar.xz 1652496 BLAKE2B 7c8e4b7743a775a5f41ef1a2e511b44ca67af32be03f4fec9a4f70b49b540a442724afd69a312d68719ace3eee9e3d600c7596bda68496212827e140da5a258e SHA512 5ebf8418bc9d311c1744c257ab7a26cf2436a64a47451905df70ec64b12d25ec33acf99e1b9d552fd54ed850bed8f53dffde2ea20292ecd9976eaa31f144caf5
25 DIST libcxx-7.0.1.src.tar.xz 1638188 BLAKE2B 541d27c3801895d59ad06b15de5fe9ff0d9b5b3ef393a5fad05a12a52dd6453ecc530b0ce3129624a27e959d3c9c5f7066ebb57fd85caca538ebf4f990aa6967 SHA512 b3ad7ad95bdcf2d902b29de8a0b757d4dbc220bc1a22a813d6bcec15a34b3aa42e85c59f4cecbb318c799ca611550b44c328b37278f4349b984016ad4556c1d8
26
27 diff --git a/sys-libs/libcxx/libcxx-7.0.0.ebuild b/sys-libs/libcxx/libcxx-7.0.0.ebuild
28 deleted file mode 100644
29 index 17b0722d40d..00000000000
30 --- a/sys-libs/libcxx/libcxx-7.0.0.ebuild
31 +++ /dev/null
32 @@ -1,219 +0,0 @@
33 -# Copyright 1999-2018 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=6
37 -
38 -# Ninja provides better scalability and cleaner verbose output, and is used
39 -# throughout all LLVM projects.
40 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
41 -# (needed due to CMAKE_BUILD_TYPE != Gentoo)
42 -CMAKE_MIN_VERSION=3.7.0-r1
43 -PYTHON_COMPAT=( python2_7 )
44 -
45 -inherit cmake-multilib llvm multiprocessing python-any-r1 \
46 - toolchain-funcs
47 -
48 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
49 -HOMEPAGE="https://libcxx.llvm.org/"
50 -SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
51 -
52 -LICENSE="|| ( UoI-NCSA MIT )"
53 -SLOT="0"
54 -KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-fbsd"
55 -IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test"
56 -REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) )
57 - ?? ( libcxxabi libcxxrt )"
58 -RESTRICT="!test? ( test )"
59 -
60 -RDEPEND="
61 - libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
62 - libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
63 - !libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )"
64 -# llvm-6 for new lit options
65 -# clang-3.9.0 installs necessary target symlinks unconditionally
66 -# which removes the need for MULTILIB_USEDEP
67 -DEPEND="${RDEPEND}
68 - test? ( >=sys-devel/clang-3.9.0
69 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
70 - app-arch/xz-utils
71 - >=sys-devel/llvm-6"
72 -
73 -S=${WORKDIR}/${P/_/}.src
74 -
75 -DOCS=( CREDITS.TXT )
76 -
77 -PATCHES=(
78 - # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
79 - # out-of-tree build.
80 - "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
81 -
82 - # Fix installing when using libsupc++ backend.
83 - # https://bugs.gentoo.org/667174
84 - "${FILESDIR}/${PN}-7.0.0-libsupcxx-install.patch"
85 -)
86 -
87 -# least intrusive of all
88 -CMAKE_BUILD_TYPE=RelWithDebInfo
89 -
90 -python_check_deps() {
91 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
92 -}
93 -
94 -pkg_setup() {
95 - llvm_pkg_setup
96 - use test && python-any-r1_pkg_setup
97 -
98 - if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then
99 - eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
100 - eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
101 - eerror "and try again."
102 - die
103 - fi
104 - if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then
105 - eerror "${PN} needs to be built with gcc-4.7 or later (or other"
106 - eerror "conformant compilers). Please use gcc-config to switch to"
107 - eerror "gcc-4.7 or later version."
108 - die
109 - fi
110 -}
111 -
112 -test_compiler() {
113 - $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
114 - <<<'int main() { return 0; }' &>/dev/null
115 -}
116 -
117 -src_configure() {
118 - # note: we need to do this before multilib kicks in since it will
119 - # alter the CHOST
120 - local cxxabi cxxabi_incs
121 - if use libcxxabi; then
122 - cxxabi=libcxxabi
123 - cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
124 - elif use libcxxrt; then
125 - cxxabi=libcxxrt
126 - cxxabi_incs="${EPREFIX}/usr/include/libcxxrt"
127 - else
128 - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
129 - cxxabi=libsupc++
130 - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
131 - fi
132 -
133 - multilib-minimal_src_configure
134 -}
135 -
136 -multilib_src_configure() {
137 - # we want -lgcc_s for unwinder, and for compiler runtime when using
138 - # gcc, clang with gcc runtime (or any unknown compiler)
139 - local extra_libs=() want_gcc_s=ON
140 - if use libunwind; then
141 - # work-around missing -lunwind upstream
142 - extra_libs+=( -lunwind )
143 - # if we're using libunwind and clang with compiler-rt, we want
144 - # to link to compiler-rt instead of -lgcc_s
145 - if tc-is-clang; then
146 - local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
147 - ${LDFLAGS} -print-libgcc-file-name)
148 - if [[ ${compiler_rt} == *libclang_rt* ]]; then
149 - want_gcc_s=OFF
150 - extra_libs+=( "${compiler_rt}" )
151 - fi
152 - fi
153 - fi
154 -
155 - # bootstrap: cmake is unhappy if compiler can't link to stdlib
156 - local nolib_flags=( -nodefaultlibs -lc )
157 - if ! test_compiler; then
158 - if test_compiler "${nolib_flags[@]}"; then
159 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
160 - ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
161 - fi
162 - fi
163 -
164 - local libdir=$(get_libdir)
165 - local mycmakeargs=(
166 - -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
167 - -DLIBCXX_ENABLE_SHARED=ON
168 - -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
169 - -DLIBCXX_CXX_ABI=${cxxabi}
170 - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
171 - # we're using our own mechanism for generating linker scripts
172 - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
173 - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
174 - -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
175 - -DLIBCXX_INCLUDE_TESTS=$(usex test)
176 - -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
177 - )
178 -
179 - if use test; then
180 - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
181 - local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
182 -
183 - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
184 -
185 - mycmakeargs+=(
186 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
187 - -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
188 - )
189 - fi
190 - cmake-utils_src_configure
191 -}
192 -
193 -multilib_src_test() {
194 - cmake-utils_src_make check-libcxx
195 -}
196 -
197 -# Usage: deps
198 -gen_ldscript() {
199 - local output_format
200 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
201 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
202 -
203 - cat <<-END_LDSCRIPT
204 -/* GNU ld script
205 - Include missing dependencies
206 -*/
207 -${output_format}
208 -GROUP ( $@ )
209 -END_LDSCRIPT
210 -}
211 -
212 -gen_static_ldscript() {
213 - local libdir=$(get_libdir)
214 - local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")")
215 -
216 - # Move it first.
217 - mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
218 - # Generate libc++.a ldscript for inclusion of its dependencies so that
219 - # clang++ -stdlib=libc++ -static works out of the box.
220 - local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
221 - # On Linux/glibc it does not link without libpthread or libdl. It is
222 - # fine on FreeBSD.
223 - use elibc_glibc && deps+=" libpthread.a libdl.a"
224 -
225 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
226 -}
227 -
228 -gen_shared_ldscript() {
229 - local libdir=$(get_libdir)
230 - # libsupc++ doesn't have a shared version
231 - local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")")
232 -
233 - mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
234 - local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
235 -
236 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
237 -}
238 -
239 -multilib_src_install() {
240 - cmake-utils_src_install
241 - gen_shared_ldscript
242 - use static-libs && gen_static_ldscript
243 -}
244 -
245 -pkg_postinst() {
246 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
247 - elog "standard library when using clang."
248 - elog "To use it, instead of libstdc++, use:"
249 - elog " clang++ -stdlib=libc++"
250 - elog "to compile your C++ programs."
251 -}