diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 39361 -> 39369 bytes | |||
-rw-r--r-- | eclass/llvm-r1.eclass | 8 | ||||
-rw-r--r-- | eclass/llvm.eclass | 18 | ||||
-rw-r--r-- | eclass/llvm.org.eclass | 4 | ||||
-rw-r--r-- | eclass/qt6-build.eclass | 36 | ||||
-rwxr-xr-x | eclass/tests/llvm-r1.sh | 10 | ||||
-rw-r--r-- | eclass/toolchain-funcs.eclass | 6 |
7 files changed, 52 insertions, 30 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 3efc8c7f3899..1f1dd53bfba7 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/llvm-r1.eclass b/eclass/llvm-r1.eclass index f2bf0fffee09..7326e3a6b271 100644 --- a/eclass/llvm-r1.eclass +++ b/eclass/llvm-r1.eclass @@ -31,8 +31,8 @@ # DEPEND=" # dev-libs/libfoo[${LLVM_USEDEP}] # $(llvm_gen_dep ' -# sys-devel/clang:${LLVM_SLOT}= -# sys-devel/llvm:${LLVM_SLOT}= +# llvm-core/clang:${LLVM_SLOT}= +# llvm-core/llvm:${LLVM_SLOT}= # ') # " # @CODE @@ -163,8 +163,8 @@ unset -f _llvm_set_globals # @CODE # DEPEND=" # $(llvm_gen_dep ' -# sys-devel/clang:${LLVM_SLOT}= -# sys-devel/llvm:${LLVM_SLOT}= +# llvm-core/clang:${LLVM_SLOT}= +# llvm-core/llvm:${LLVM_SLOT}= # ') # " # @CODE diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass index 9f757e704f7a..7314fd381806 100644 --- a/eclass/llvm.eclass +++ b/eclass/llvm.eclass @@ -24,11 +24,11 @@ # inherit cmake llvm # # RDEPEND=" -# <sys-devel/llvm-11:= +# <llvm-core/llvm-11:= # || ( -# sys-devel/llvm:9 -# sys-devel/llvm:10 -# sys-devel/llvm:11 +# llvm-core/llvm:9 +# llvm-core/llvm:10 +# llvm-core/llvm:11 # ) # " # DEPEND=${RDEPEND} @@ -49,12 +49,12 @@ # # note: do not use := on both clang and llvm, it can match different # # slots then. clang pulls llvm in, so we can skip the latter. # RDEPEND=" -# >=sys-devel/clang-9:=[llvm_targets_AMDGPU(+)] +# >=llvm-core/clang-9:=[llvm_targets_AMDGPU(+)] # " # DEPEND=${RDEPEND} # # llvm_check_deps() { -# has_version -d "sys-devel/clang:${LLVM_SLOT}[llvm_targets_AMDGPU(+)]" +# has_version -d "llvm-core/clang:${LLVM_SLOT}[llvm_targets_AMDGPU(+)]" # } # @CODE @@ -70,7 +70,7 @@ inherit llvm-utils # make sure that the versions installing straight into /usr/bin # are uninstalled -DEPEND="!!sys-devel/llvm:0" +DEPEND="!!llvm-core/llvm:0" # @ECLASS_VARIABLE: LLVM_MAX_SLOT # @DEFAULT_UNSET @@ -116,7 +116,7 @@ declare -g -r _LLVM_KNOWN_SLOTS=( {19..8} ) # the function scope, LLVM_SLOT will be defined to the SLOT value # (0, 4, 5...). The function should return a true status if the slot # is acceptable, false otherwise. If llvm_check_deps() is not defined, -# the function defaults to checking whether sys-devel/llvm:${LLVM_SLOT} +# the function defaults to checking whether llvm-core/llvm:${LLVM_SLOT} # is installed. get_llvm_slot() { debug-print-function ${FUNCNAME} "$@" @@ -147,7 +147,7 @@ get_llvm_slot() { llvm_check_deps || continue else # check if LLVM package is installed - has_version ${hv_switch} "sys-devel/llvm:${slot}" || continue + has_version ${hv_switch} "llvm-core/llvm:${slot}" || continue fi echo "${slot}" diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index 068d50e70eb1..a7685a38575b 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -140,7 +140,7 @@ fi # and REQUIRED_USE will be added but no dependencies. # # - llvm - this package uses targets from LLVM. RDEPEND+DEPEND -# on matching sys-devel/llvm versions with requested flags will +# on matching llvm-core/llvm versions with requested flags will # be added. # # Note that you still need to pass enabled targets to the build system, @@ -330,7 +330,7 @@ llvm.org_set_globals() { local dep= for x in "${ALL_LLVM_TARGET_FLAGS[@]}"; do dep+=" - ${x}? ( ~sys-devel/llvm-${PV}[${x}] )" + ${x}? ( ~llvm-core/llvm-${PV}[${x}] )" done RDEPEND+=" ${dep}" DEPEND+=" ${dep}" diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass index 3d3531dd96d5..f8161447074a 100644 --- a/eclass/qt6-build.eclass +++ b/eclass/qt6-build.eclass @@ -156,6 +156,8 @@ qt6-build_src_configure() { # cmake defaults to "STATUS" but Qt changes that to "NOTICE" which # hides a lot of information that is useful for bug reports --log-level=STATUS + # ...but dev messages are noisy and not really useful downstream + -Wno-dev # see _qt6-build_create_user_facing_links -DINSTALL_PUBLICBINDIR="${QT6_PREFIX}"/bin # note that if qtbase was built with tests, this is default ON @@ -309,12 +311,16 @@ _qt6-build_sanitize_cpu_flags() { avx512vp2intersect ) + local sanitize + # check if any known problematic -mno-* C(XX)FLAGS - if ! is-flagq "@($(IFS='|'; echo "${cpuflags[*]/#/-mno-}"))"; then - # check if qsimd_p.h (search for "enable all") will accept -march, and - # further check when -march=haswell is appended (which Qt uses for some - # parts) given combination with other -m* could lead to partial support - local bad flags + is-flagq "@($(IFS='|'; echo "${cpuflags[*]/#/-mno-}"))" && sanitize=1 + + # check if qsimd_p.h (search for "enable all") will accept -march, and + # further check when -march=haswell is appended (which Qt uses for some + # parts) given combination with other -m* could lead to partial support + if [[ ! -v sanitize ]]; then + local flags for flags in '' '-march=haswell'; do : "$($(tc-getCXX) -E -P ${CXXFLAGS} ${CPPFLAGS} ${flags} - <<-EOF | tail -n 1 #if (defined(__AVX2__) && (__BMI__ + __BMI2__ + __F16C__ + __FMA__ + __LZCNT__ + __POPCNT__) != 6) || \ @@ -324,11 +330,27 @@ _qt6-build_sanitize_cpu_flags() { EOF pipestatus || die )" - [[ ${_} == bad ]] && bad=1 && break + if [[ ${_} == bad ]]; then + sanitize=1 + break + fi done - [[ -v bad ]] || return 0 # *should* be fine as-is fi + # some cpus have broken rdrand/rdseed and it's enabled regardless + # with -march=native, Qt detects this and fails (bug #922498) + if [[ ! -v sanitize ]] && + ! tc-is-cross-compiler && + # the kernel also detects this and removes it from cpuinfo + [[ -r /proc/cpuinfo && $(</proc/cpuinfo) != *rdrand* ]] && + tc-cpp-is-true __RDRND__ ${CXXFLAGS} ${CPPFLAGS} + then + einfo "Detected CPU with (likely) broken rdrand/rdseed (bug #922498)" + sanitize=1 + fi + + [[ -v sanitize ]] || return 0 # *should* be fine as-is + # determine highest(known) usable x86-64 feature level local march=$( $(tc-getCXX) -E -P ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1 diff --git a/eclass/tests/llvm-r1.sh b/eclass/tests/llvm-r1.sh index 8583fd6c799b..892b773a08c9 100755 --- a/eclass/tests/llvm-r1.sh +++ b/eclass/tests/llvm-r1.sh @@ -149,11 +149,11 @@ test_globals '19' \ LLVM_COMPAT=( {14..18} ) inherit llvm-r1 -test_gen_dep 'sys-devel/llvm:${LLVM_SLOT} sys-devel/clang:${LLVM_SLOT}' <<-EOF - llvm_slot_15? ( sys-devel/llvm:15 sys-devel/clang:15 ) - llvm_slot_16? ( sys-devel/llvm:16 sys-devel/clang:16 ) - llvm_slot_17? ( sys-devel/llvm:17 sys-devel/clang:17 ) - llvm_slot_18? ( sys-devel/llvm:18 sys-devel/clang:18 ) +test_gen_dep 'llvm-core/llvm:${LLVM_SLOT} llvm-core/clang:${LLVM_SLOT}' <<-EOF + llvm_slot_15? ( llvm-core/llvm:15 llvm-core/clang:15 ) + llvm_slot_16? ( llvm-core/llvm:16 llvm-core/clang:16 ) + llvm_slot_17? ( llvm-core/llvm:17 llvm-core/clang:17 ) + llvm_slot_18? ( llvm-core/llvm:18 llvm-core/clang:18 ) EOF texit diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 478177de141e..2911ed66e63c 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -672,7 +672,7 @@ tc-check-openmp() { if tc-is-gcc; then eerror "Enable OpenMP support by building sys-devel/gcc with USE=\"openmp\"." elif tc-is-clang; then - eerror "OpenMP support in sys-devel/clang is provided by sys-libs/libomp." + eerror "OpenMP support in llvm-core/clang is provided by llvm-runtimes/openmp." fi die "Active compiler does not have required support for OpenMP" @@ -1242,7 +1242,7 @@ gen_usr_ldscript() { # If the library is identified, the function returns 0 and prints one # of the following: # -# - ``libc++`` for ``sys-libs/libcxx`` +# - ``libc++`` for ``llvm-runtimes/libcxx`` # - ``libstdc++`` for ``sys-devel/gcc``'s libstdc++ # # If the library is not recognized, the function returns 1. @@ -1278,7 +1278,7 @@ tc-get-cxx-stdlib() { # If the runtime is identifed, the function returns 0 and prints one # of the following: # -# - ``compiler-rt`` for ``sys-libs/compiler-rt`` +# - ``compiler-rt`` for ``llvm-runtimes/compiler-rt`` # - ``libgcc`` for ``sys-devel/gcc``'s libgcc # # If the runtime is not recognized, the function returns 1. |