[dev-db/mongodb] hopefully finish clang changes

This commit is contained in:
Robert Förster 2024-09-08 19:54:02 +02:00
parent b360af06a9
commit 040134f5b2
2 changed files with 16 additions and 6 deletions

View File

@ -46,7 +46,6 @@ RDEPEND="acct-group/mongodb
clang? (
$(llvm_gen_dep "
sys-devel/clang:\${LLVM_SLOT}
sys-devel/llvm:\${LLVM_SLOT}
")
)
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
@ -120,6 +119,7 @@ pkg_setup() {
python-any-r1_pkg_setup
if use clang; then
llvm-r1_pkg_setup
llvm_fix_tool_path CC CXX
fi
}
@ -157,7 +157,7 @@ src_configure() {
)
local have_switched_compiler=
if use clang; then
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}")
@ -187,6 +187,12 @@ src_configure() {
CC="${CC}"
CXX="${CXX}"
)
else
scons_opts+=(
AR="$(tc-getAR)"
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
)
fi
if [[ -n "${have_switched_compiler}" ]] ; then
@ -196,7 +202,6 @@ src_configure() {
scons_opts+=(
CCFLAGS="${CXXFLAGS}"
)
fi
use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300

View File

@ -47,7 +47,6 @@ RDEPEND="acct-group/mongodb
clang? (
$(llvm_gen_dep "
sys-devel/clang:\${LLVM_SLOT}
sys-devel/llvm:\${LLVM_SLOT}
")
)
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
@ -121,6 +120,7 @@ pkg_setup() {
python-any-r1_pkg_setup
if use clang; then
llvm-r1_pkg_setup
llvm_fix_tool_path CC CXX
fi
}
@ -158,7 +158,7 @@ src_configure() {
)
local have_switched_compiler=
if use clang; then
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}")
@ -188,6 +188,12 @@ src_configure() {
CC="${CC}"
CXX="${CXX}"
)
else
scons_opts+=(
AR="$(tc-getAR)"
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
)
fi
if [[ -n "${have_switched_compiler}" ]] ; then
@ -197,7 +203,6 @@ src_configure() {
scons_opts+=(
CCFLAGS="${CXXFLAGS}"
)
fi
use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300