mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
llvm-runtimes/libgcc: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -6,9 +6,6 @@ DIST llvm-project-21.1.8.src.tar.xz 158958576 BLAKE2B 0d3d4ee920f8e5db50e9815261
|
||||
DIST llvm-project-21.1.8.src.tar.xz.sig 119 BLAKE2B cffc1825f5778a3e3c128ec3e856ff6ee50687319d621cdf42e895abf67e05cc51cb7493308e2b506ab60dbdbaca7aa75eb9f78d91d42c81f9682a36f4042e9d SHA512 10f58eff58ed6e701d0f123b15e68c82ab8cbdf99b1c86c0d83e3b8553e90ea51055e30327e8e442ded57c8f503e2a2de9ee075e9c28b5ba815a0f8922f8671c
|
||||
DIST llvm-project-22.1.8.src.tar.xz 167061596 BLAKE2B 092204f62e0f0364a041c737eb2c25fd073cb5689663d6ccd5a9e4e1743d6d80822360d59b64bff7b4d7872a68a79e899bf2f75f384e55c7d313a79243576f03 SHA512 2615b20ba08534f83ab8ecc7b5ba43b5f1dfcf9cdb2534a32fcdbf0ccdd9a008b46276e45ef26ed9377f65b5e4ae89ea798f3863fd034484b5715140f3a7b35c
|
||||
DIST llvm-project-22.1.8.src.tar.xz.sig 119 BLAKE2B 2ce93472036e68782252991e4a8bdbeeec8706a56022220083a38a42ef18714a7894c41aaa04dc0d03f18601d8bfc1a5a030ed0ef0f0d64a662eae9843a4b362 SHA512 99a457b5b1fb409a5fe72b59ebd4ddae5cade3e5f2493e33b44d4f4b4625f7a1743f80106efb1134668842b15ea3400ce2c29263bec8ff986e05040910125e15
|
||||
DIST llvm-project-23.1.3.src.tar.xz 179220548 BLAKE2B 1ce328590eb86e5a8d117a1d5c2c4b691d9c1a897f239ba197e14f47b660e927313133e94a518c43ceed163fc081760d5d33e2685a94af1031184a0960ffb5c7 SHA512 eb76f37804564a2595ca8de4864e96cf13c0a3f07922f6bce4d11771547525785c0fde54457aadf7aa1bcaac496475f1dde00e1b152c1df560669c6e3e1318bf
|
||||
DIST llvm-project-23.1.3.src.tar.xz.sig 466 BLAKE2B 0f5bc2af1f860f908ecb10b057170a832d42c5d916b63b86b75e529466d1ab2f6b2258c3b51a3cb0f236d9553d2990550343f371062d5224fb319bb9d4be26cd SHA512 7eabfb513a5516cab7d2d366117abd36bdb9d1a50e8ab0b21991d8143222e965ac53dbbacc80c8977ed8aaee57b480b7fdbdae0ba847f62c031da69989d34d2d
|
||||
DIST llvm-project-23.1.4.src.tar.xz 179272572 BLAKE2B dbd14791e5674d89427f2abec54a30c5570bac6b8a2b210611bc4cb9ded4f057f729f8d20df29ec7ffca34f767294a1c589a09a13e79bef29b124d62a84a53ea SHA512 1443531768d7040677302e4468b95b345511f10881a072e703814e9e10316d6ce12f56e8d1fbab5c350550380ae8d242acebb68c833fa385ea7777f05d8bde23
|
||||
DIST llvm-project-23.1.4.src.tar.xz.sig 466 BLAKE2B 120e228f58ada689b8ae04221fc5c682c577f827e4e27e68a931e640c2462414681e0e3ca93ba6cefd4d910e138d17c673afd91220ff84afe49d299d01f2159a SHA512 1c37a50413faffb4f73c76583bbc3148d7e28005126aed0a41f63882aae174ba840aeaf6b43e56649d64e749fe9503c8f41435c7bdcf62468b1c0b4b93515802
|
||||
DIST llvm-project-53310c92e86e1c285b1fe3aaf76158addd0a2036.tar.gz 320028470 BLAKE2B f71cfa7241e3272e3f85200a2f83ffa2ec99b713d444102ce4e0b8420019a6f0f7818ce4a04a2f59be455cd2c26f557c814afbd4613ea09c6133e9faeaf90f42 SHA512 c9304de60fa1ef194b0d1ef158a6d0638465a723a86fbac922184fbd808044e43cd709bc4b5f15cbf04f6ddc465bedc7220978a4913959e4094c9e0ca9a2022a
|
||||
DIST llvm-project-c5904d2bebe0497b30a712adc085e96107f03160.tar.gz 321341453 BLAKE2B d2915041721282318947af08cfa79b42017dcaf9674863469f97752a6f98c323539fda7c329a926b274a7e196da1aef7ed747945a5a374cfb0803474368a0214 SHA512 55fb2c912d0b87fa6bea5eacd1006a44f40a2880e59b6eec2e22e21cedd4b67eef0da66a58b03c508fc1f2e77e815cba034ed0b1c3cf11ad99a15186f16f9244
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{12..14} )
|
||||
|
||||
inherit cmake crossdev flag-o-matic llvm.org llvm-utils python-any-r1
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Compiler runtime library for clang, compatible with libgcc_s"
|
||||
HOMEPAGE="https://llvm.org/"
|
||||
|
||||
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="debug test"
|
||||
|
||||
DEPEND="
|
||||
~llvm-runtimes/libunwind-${PV}[static-libs]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
!sys-devel/gcc
|
||||
"
|
||||
BDEPEND="
|
||||
llvm-core/clang:${LLVM_MAJOR}
|
||||
test? (
|
||||
$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
|
||||
=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
|
||||
)
|
||||
!test? (
|
||||
${PYTHON_DEPS}
|
||||
)
|
||||
"
|
||||
|
||||
LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake llvm-libgcc third-party/siphash )
|
||||
LLVM_TEST_COMPONENTS=( llvm/include/llvm/TargetParser )
|
||||
llvm.org_set_globals
|
||||
|
||||
python_check_deps() {
|
||||
use test || return 0
|
||||
python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if target_is_not_host || tc-is-cross-compiler ; then
|
||||
# strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
|
||||
CHOST=${CTARGET} strip-unsupported-flags
|
||||
# overrides host docs otherwise
|
||||
DOCS=()
|
||||
fi
|
||||
python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# We need to build a separate copy of compiler-rt, because we need to disable the
|
||||
# COMPILER_RT_BUILTINS_HIDE_SYMBOLS option - compatibility with libgcc requires
|
||||
# visibility of all symbols.
|
||||
|
||||
llvm_prepend_path -b "${LLVM_MAJOR}"
|
||||
|
||||
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
|
||||
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
|
||||
|
||||
export CC=${CTARGET}-clang CXX=${CTARGET}-clang++
|
||||
strip-unsupported-flags
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
|
||||
-DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
|
||||
|
||||
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
|
||||
-DCOMPILER_RT_BUILD_CRT=OFF
|
||||
-DCOMPILER_RT_BUILD_CTX_PROFILE=OFF
|
||||
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
|
||||
-DCOMPILER_RT_BUILD_MEMPROF=OFF
|
||||
-DCOMPILER_RT_BUILD_ORC=OFF
|
||||
-DCOMPILER_RT_BUILD_PROFILE=OFF
|
||||
-DCOMPILER_RT_BUILD_SANITIZERS=OFF
|
||||
-DCOMPILER_RT_BUILD_XRAY=OFF
|
||||
|
||||
-DCOMPILER_RT_BUILTINS_HIDE_SYMBOLS=OFF
|
||||
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
)
|
||||
|
||||
# disable building non-native runtimes since we don't do multilib
|
||||
if use amd64; then
|
||||
mycmakeargs+=(
|
||||
-DCAN_TARGET_i386=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
|
||||
-DLLVM_LIT_ARGS="$(get_lit_flags)"
|
||||
|
||||
-DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
|
||||
-DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
local rtlib=$(
|
||||
"${CC}" -rtlib=compiler-rt -resource-dir="${BUILD_DIR}" \
|
||||
-print-libgcc-file-name || die
|
||||
)
|
||||
|
||||
# Use the llvm-libgcc's version script to produce libgcc.{a,so}, which
|
||||
# combines compiler-rt and libunwind into a libgcc replacement.
|
||||
#
|
||||
# What we do here is similar to what upstream does[0], with the following
|
||||
# differences:
|
||||
#
|
||||
# * We build the local copy of compiler-rt manually, to have a full control
|
||||
# over CMake options.
|
||||
# * Upstream links the locally built copy of libunwind statically. We link the
|
||||
# system-wide libunwind dynamically.
|
||||
#
|
||||
# [0] https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm-libgcc/CMakeLists.txt#L102-L120
|
||||
"${CC}" -E -xc \
|
||||
"${WORKDIR}/llvm-libgcc/gcc_s.ver.in" \
|
||||
-o gcc_s.ver || die
|
||||
"${CC}" -nostdlib \
|
||||
${LDFLAGS} \
|
||||
-Wl,--version-script,gcc_s.ver \
|
||||
-Wl,--undefined-version \
|
||||
-Wl,--whole-archive \
|
||||
"${rtlib}" \
|
||||
-Wl,-soname,libgcc_s.so.1.0 \
|
||||
-lc -lunwind -shared \
|
||||
-o libgcc_s.so.1.0 || die
|
||||
# Generate libgcc_s.so ldscript for inclusion of libunwind as a
|
||||
# dependency so that `clang -lgcc_s` works out of the box.
|
||||
gen_ldscript libgcc_s.so.1.0 libunwind.so.1.0 > libgcc_s.so || die
|
||||
cp "${rtlib}" libgcc.a || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# respect TMPDIR!
|
||||
local -x LIT_PRESERVES_TMP=1
|
||||
|
||||
cmake_build check-builtins
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=$(get_libdir)
|
||||
dolib.so libgcc_s.so.1.0 libgcc_s.so
|
||||
dolib.a libgcc.a
|
||||
dosym libgcc_s.so.1.0 "/usr/${libdir}/libgcc_s.so.1"
|
||||
dosym libunwind.a "/usr/${libdir}/libgcc_eh.a"
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{12..14} )
|
||||
|
||||
inherit cmake crossdev flag-o-matic llvm.org llvm-utils python-any-r1
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Compiler runtime library for clang, compatible with libgcc_s"
|
||||
HOMEPAGE="https://llvm.org/"
|
||||
|
||||
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
|
||||
SLOT="0"
|
||||
IUSE="debug test"
|
||||
|
||||
DEPEND="
|
||||
~llvm-runtimes/libunwind-${PV}[static-libs]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
!sys-devel/gcc
|
||||
"
|
||||
BDEPEND="
|
||||
llvm-core/clang:${LLVM_MAJOR}
|
||||
test? (
|
||||
$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
|
||||
=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
|
||||
)
|
||||
!test? (
|
||||
${PYTHON_DEPS}
|
||||
)
|
||||
"
|
||||
|
||||
LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake llvm-libgcc third-party/siphash )
|
||||
LLVM_TEST_COMPONENTS=( llvm/include/llvm/TargetParser )
|
||||
llvm.org_set_globals
|
||||
|
||||
python_check_deps() {
|
||||
use test || return 0
|
||||
python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if target_is_not_host || tc-is-cross-compiler ; then
|
||||
# strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
|
||||
CHOST=${CTARGET} strip-unsupported-flags
|
||||
# overrides host docs otherwise
|
||||
DOCS=()
|
||||
fi
|
||||
python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# We need to build a separate copy of compiler-rt, because we need to disable the
|
||||
# COMPILER_RT_BUILTINS_HIDE_SYMBOLS option - compatibility with libgcc requires
|
||||
# visibility of all symbols.
|
||||
|
||||
llvm_prepend_path -b "${LLVM_MAJOR}"
|
||||
|
||||
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
|
||||
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
|
||||
|
||||
export CC=${CTARGET}-clang CXX=${CTARGET}-clang++
|
||||
strip-unsupported-flags
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
|
||||
-DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
|
||||
|
||||
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
|
||||
-DCOMPILER_RT_BUILD_CRT=OFF
|
||||
-DCOMPILER_RT_BUILD_CTX_PROFILE=OFF
|
||||
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
|
||||
-DCOMPILER_RT_BUILD_MEMPROF=OFF
|
||||
-DCOMPILER_RT_BUILD_ORC=OFF
|
||||
-DCOMPILER_RT_BUILD_PROFILE=OFF
|
||||
-DCOMPILER_RT_BUILD_SANITIZERS=OFF
|
||||
-DCOMPILER_RT_BUILD_XRAY=OFF
|
||||
|
||||
-DCOMPILER_RT_BUILTINS_HIDE_SYMBOLS=OFF
|
||||
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
)
|
||||
|
||||
# disable building non-native runtimes since we don't do multilib
|
||||
if use amd64; then
|
||||
mycmakeargs+=(
|
||||
-DCAN_TARGET_i386=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
|
||||
-DLLVM_LIT_ARGS="$(get_lit_flags)"
|
||||
|
||||
-DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
|
||||
-DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
local rtlib=$(
|
||||
"${CC}" -rtlib=compiler-rt -resource-dir="${BUILD_DIR}" \
|
||||
-print-libgcc-file-name || die
|
||||
)
|
||||
|
||||
# Use the llvm-libgcc's version script to produce libgcc.{a,so}, which
|
||||
# combines compiler-rt and libunwind into a libgcc replacement.
|
||||
#
|
||||
# What we do here is similar to what upstream does[0], with the following
|
||||
# differences:
|
||||
#
|
||||
# * We build the local copy of compiler-rt manually, to have a full control
|
||||
# over CMake options.
|
||||
# * Upstream links the locally built copy of libunwind statically. We link the
|
||||
# system-wide libunwind dynamically.
|
||||
#
|
||||
# [0] https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm-libgcc/CMakeLists.txt#L102-L120
|
||||
"${CC}" -E -xc \
|
||||
"${WORKDIR}/llvm-libgcc/gcc_s.ver.in" \
|
||||
-o gcc_s.ver || die
|
||||
"${CC}" -nostdlib \
|
||||
${LDFLAGS} \
|
||||
-Wl,--version-script,gcc_s.ver \
|
||||
-Wl,--undefined-version \
|
||||
-Wl,--whole-archive \
|
||||
"${rtlib}" \
|
||||
-Wl,-soname,libgcc_s.so.1.0 \
|
||||
-lc -lunwind -shared \
|
||||
-o libgcc_s.so.1.0 || die
|
||||
# Generate libgcc_s.so ldscript for inclusion of libunwind as a
|
||||
# dependency so that `clang -lgcc_s` works out of the box.
|
||||
gen_ldscript libgcc_s.so.1.0 libunwind.so.1.0 > libgcc_s.so || die
|
||||
cp "${rtlib}" libgcc.a || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# respect TMPDIR!
|
||||
local -x LIT_PRESERVES_TMP=1
|
||||
|
||||
cmake_build check-builtins
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=$(get_libdir)
|
||||
dolib.so libgcc_s.so.1.0 libgcc_s.so
|
||||
dolib.a libgcc.a
|
||||
dosym libgcc_s.so.1.0 "/usr/${libdir}/libgcc_s.so.1"
|
||||
dosym libunwind.a "/usr/${libdir}/libgcc_eh.a"
|
||||
}
|
||||
Reference in New Issue
Block a user