[dev-db/mongodb] remove clang support from 5.0, almost EOL
This commit is contained in:
parent
e1c96a1978
commit
e622843475
@ -3,9 +3,6 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 18 )
|
||||
LLVM_OPTIONAL=1
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
SCONS_MIN_VERSION="3.3.1"
|
||||
@ -13,7 +10,7 @@ CHECKREQS_DISK_BUILD="2400M"
|
||||
CHECKREQS_DISK_USR="512M"
|
||||
CHECKREQS_MEMORY="1024M"
|
||||
|
||||
inherit check-reqs flag-o-matic llvm-r1 multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
|
||||
inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
|
||||
|
||||
MY_PV=r${PV/_rc/-rc}
|
||||
MY_P=mongo-${MY_PV}
|
||||
@ -27,7 +24,7 @@ LICENSE="Apache-2.0 SSPL-1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 -riscv"
|
||||
CPU_FLAGS="cpu_flags_x86_avx"
|
||||
IUSE="debug clang kerberos mongosh ssl +tools ${CPU_FLAGS}"
|
||||
IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}"
|
||||
|
||||
# https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server
|
||||
# resmoke needs python packages not yet present in Gentoo
|
||||
@ -43,11 +40,6 @@ RDEPEND="acct-group/mongodb
|
||||
dev-libs/snowball-stemmer:=
|
||||
net-misc/curl
|
||||
>=sys-libs/zlib-1.2.12:=
|
||||
clang? (
|
||||
$(llvm_gen_dep "
|
||||
sys-devel/clang:\${LLVM_SLOT}
|
||||
")
|
||||
)
|
||||
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
|
||||
ssl? (
|
||||
>=dev-libs/openssl-1.0.1g:0=
|
||||
@ -115,14 +107,6 @@ pkg_pretend() {
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
if use clang; then
|
||||
llvm-r1_pkg_setup
|
||||
llvm_fix_tool_path CC CXX
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
@ -139,6 +123,11 @@ src_configure() {
|
||||
# --use-system-tcmalloc is strongly NOT recommended:
|
||||
# for MONGO_GIT_HASH use GitOrigin-RevId from the commit of the tag
|
||||
scons_opts=(
|
||||
AR="$(tc-getAR)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
CCFLAGS="${CXXFLAGS}"
|
||||
|
||||
VERBOSE=1
|
||||
VARIANT_DIR=gentoo
|
||||
MONGO_VERSION="${PV}"
|
||||
@ -156,54 +145,6 @@ src_configure() {
|
||||
--use-system-zstd
|
||||
)
|
||||
|
||||
local have_switched_compiler=
|
||||
if use clang && ! tc-is-clang; then
|
||||
# Force clang
|
||||
local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
|
||||
[[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
|
||||
[[ -z ${version_clang} ]] && die "Failed to read clang version!"
|
||||
|
||||
if tc-is-gcc; then
|
||||
have_switched_compiler=yes
|
||||
fi
|
||||
|
||||
AR=llvm-ar
|
||||
CC=${CHOST}-clang-${version_clang}
|
||||
CXX=${CHOST}-clang++-${version_clang}
|
||||
|
||||
scons_opts+=(
|
||||
AR="$(get_llvm_prefix)/bin/${AR}"
|
||||
CC="$(get_llvm_prefix)/bin/${CC}"
|
||||
CXX="$(get_llvm_prefix)/bin/${CXX}"
|
||||
)
|
||||
elif ! use clang && ! tc-is-gcc ; then
|
||||
# Force gcc
|
||||
have_switched_compiler=yes
|
||||
AR=gcc-ar
|
||||
CC=${CHOST}-gcc
|
||||
CXX=${CHOST}-g++
|
||||
scons_opts+=(
|
||||
AR="${AR}"
|
||||
CC="${CC}"
|
||||
CXX="${CXX}"
|
||||
)
|
||||
else
|
||||
scons_opts+=(
|
||||
AR="$(tc-getAR)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ -n "${have_switched_compiler}" ]] ; then
|
||||
# Because we switched active compiler we have to ensure
|
||||
# that no unsupported flags are set
|
||||
strip-unsupported-flags
|
||||
scons_opts+=(
|
||||
CCFLAGS="${CXXFLAGS}"
|
||||
)
|
||||
fi
|
||||
|
||||
use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300
|
||||
use amd64 && scons_opts+=( --experimental-optimization=-sandybridge ) # Bug 890294
|
||||
use debug && scons_opts+=( --dbg=on )
|
||||
|
Loading…
Reference in New Issue
Block a user