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: Mon, 17 May 2021 07:01:50
Message-Id: 1621234888.743f3e96f7bae3d04d42fbdaa021d7434d27321d.mgorny@gentoo
1 commit: 743f3e96f7bae3d04d42fbdaa021d7434d27321d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 17 06:59:56 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon May 17 07:01:28 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=743f3e96
7
8 sys-libs/libcxx: Remove 11.0.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/libcxx/Manifest | 1 -
13 sys-libs/libcxx/libcxx-11.0.1.ebuild | 211 -----------------------------------
14 2 files changed, 212 deletions(-)
15
16 diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
17 index 4e0f31a4b81..eb60851a3a8 100644
18 --- a/sys-libs/libcxx/Manifest
19 +++ b/sys-libs/libcxx/Manifest
20 @@ -3,6 +3,5 @@ DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11f
21 DIST llvm-gentoo-patchset-12.0.0-1.tar.xz 6364 BLAKE2B bcf96dad8300cdc3e1f416cb90935ae3b1359efc5687118b5a9bbee25de7087a266250f50c6f2abd18f4efeeec19354f59513c8fdd1d61c2cfc8cc2f0115e514 SHA512 76201e169f71a8d568365ffeafcfd37138e74b0536826f47eb6ce89c2280586f10426917e851f99bfb20477cd828cc40daa8cb7a62959981620fbd81e1b22ee1
22 DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
23 DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
24 -DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf
25 DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
26 DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26
27
28 diff --git a/sys-libs/libcxx/libcxx-11.0.1.ebuild b/sys-libs/libcxx/libcxx-11.0.1.ebuild
29 deleted file mode 100644
30 index 16172647c29..00000000000
31 --- a/sys-libs/libcxx/libcxx-11.0.1.ebuild
32 +++ /dev/null
33 @@ -1,211 +0,0 @@
34 -# Copyright 1999-2021 Gentoo Authors
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -EAPI=7
38 -
39 -CMAKE_ECLASS=cmake
40 -PYTHON_COMPAT=( python3_{7..9} )
41 -inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
42 -
43 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
44 -HOMEPAGE="https://libcxx.llvm.org/"
45 -
46 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
47 -SLOT="0"
48 -KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
49 -IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind static-libs test"
50 -REQUIRED_USE="libunwind? ( libcxxabi )"
51 -RESTRICT="!test? ( test )"
52 -
53 -RDEPEND="
54 - libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
55 - !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
56 -# llvm-6 for new lit options
57 -# clang-3.9.0 installs necessary target symlinks unconditionally
58 -# which removes the need for MULTILIB_USEDEP
59 -DEPEND="${RDEPEND}
60 - >=sys-devel/llvm-6"
61 -BDEPEND="
62 - test? (
63 - >=dev-util/cmake-3.16
64 - >=sys-devel/clang-3.9.0
65 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
66 - )"
67 -
68 -DOCS=( CREDITS.TXT )
69 -
70 -LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
71 -LLVM_PATCHSET=11.1.0-1
72 -llvm.org_set_globals
73 -
74 -python_check_deps() {
75 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
76 -}
77 -
78 -pkg_setup() {
79 - # Darwin Prefix builds do not have llvm installed yet, so rely on
80 - # bootstrap-prefix to set the appropriate path vars to LLVM instead
81 - # of using llvm_pkg_setup.
82 - if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
83 - llvm_pkg_setup
84 - fi
85 - use test && python-any-r1_pkg_setup
86 -
87 - if ! use libcxxabi && ! tc-is-gcc ; then
88 - eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
89 - eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
90 - eerror "and try again."
91 - die
92 - fi
93 -}
94 -
95 -test_compiler() {
96 - $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
97 - <<<'int main() { return 0; }' &>/dev/null
98 -}
99 -
100 -src_configure() {
101 - # note: we need to do this before multilib kicks in since it will
102 - # alter the CHOST
103 - local cxxabi cxxabi_incs
104 - if use libcxxabi; then
105 - cxxabi=libcxxabi
106 - cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
107 - else
108 - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
109 - cxxabi=libsupc++
110 - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
111 - fi
112 -
113 - multilib-minimal_src_configure
114 -}
115 -
116 -multilib_src_configure() {
117 - # we want -lgcc_s for unwinder, and for compiler runtime when using
118 - # gcc, clang with gcc runtime (or any unknown compiler)
119 - local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
120 - if use libunwind; then
121 - # work-around missing -lunwind upstream
122 - extra_libs+=( -lunwind )
123 - # if we're using libunwind and clang with compiler-rt, we want
124 - # to link to compiler-rt instead of -lgcc_s
125 - if tc-is-clang; then
126 - local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
127 - ${LDFLAGS} -print-libgcc-file-name)
128 - if [[ ${compiler_rt} == *libclang_rt* ]]; then
129 - want_gcc_s=OFF
130 - want_compiler_rt=ON
131 - extra_libs+=( "${compiler_rt}" )
132 - fi
133 - fi
134 - elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
135 - # clang-based darwin prefix disables libunwind useflag during
136 - # bootstrap, because libunwind is not in the prefix yet.
137 - # override the default, though, because clang based libcxx
138 - # should never use gcc_s on Darwin.
139 - want_gcc_s=OFF
140 - # compiler_rt is not available in EPREFIX during bootstrap,
141 - # so we cannot link to it yet anyway, so keep the defaults
142 - # of want_compiler_rt=OFF and extra_libs=()
143 - fi
144 -
145 - # bootstrap: cmake is unhappy if compiler can't link to stdlib
146 - local nolib_flags=( -nodefaultlibs -lc )
147 - if ! test_compiler; then
148 - if test_compiler "${nolib_flags[@]}"; then
149 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
150 - ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
151 - fi
152 - fi
153 -
154 - local libdir=$(get_libdir)
155 - local mycmakeargs=(
156 - -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
157 - -DLIBCXX_ENABLE_SHARED=ON
158 - -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
159 - -DLIBCXX_CXX_ABI=${cxxabi}
160 - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
161 - # we're using our own mechanism for generating linker scripts
162 - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
163 - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
164 - -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
165 - -DLIBCXX_INCLUDE_TESTS=$(usex test)
166 - -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
167 - -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
168 - )
169 -
170 - if use test; then
171 - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
172 - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
173 -
174 - mycmakeargs+=(
175 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
176 - -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
177 - -DPython3_EXECUTABLE="${PYTHON}"
178 - )
179 - fi
180 - cmake_src_configure
181 -}
182 -
183 -multilib_src_test() {
184 - local -x LIT_PRESERVES_TMP=1
185 - cmake_build check-cxx
186 -}
187 -
188 -# Usage: deps
189 -gen_ldscript() {
190 - local output_format
191 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
192 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
193 -
194 - cat <<-END_LDSCRIPT
195 -/* GNU ld script
196 - Include missing dependencies
197 -*/
198 -${output_format}
199 -GROUP ( $@ )
200 -END_LDSCRIPT
201 -}
202 -
203 -gen_static_ldscript() {
204 - local libdir=$(get_libdir)
205 - local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
206 -
207 - # Move it first.
208 - mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
209 - # Generate libc++.a ldscript for inclusion of its dependencies so that
210 - # clang++ -stdlib=libc++ -static works out of the box.
211 - local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
212 - # On Linux/glibc it does not link without libpthread or libdl. It is
213 - # fine on FreeBSD.
214 - use elibc_glibc && deps+=" libpthread.a libdl.a"
215 -
216 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
217 -}
218 -
219 -gen_shared_ldscript() {
220 - local libdir=$(get_libdir)
221 - # libsupc++ doesn't have a shared version
222 - local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
223 -
224 - mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
225 - local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
226 -
227 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
228 -}
229 -
230 -multilib_src_install() {
231 - cmake_src_install
232 - if [[ ${CHOST} != *-darwin* ]] ; then
233 - gen_shared_ldscript
234 - use static-libs && gen_static_ldscript
235 - fi
236 -}
237 -
238 -pkg_postinst() {
239 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
240 - elog "standard library when using clang."
241 - elog "To use it, instead of libstdc++, use:"
242 - elog " clang++ -stdlib=libc++"
243 - elog "to compile your C++ programs."
244 -}