summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro_gentoo@matoro.tk>2023-12-19 17:50:52 -0500
committerSam James <sam@gentoo.org>2023-12-28 02:55:09 +0000
commitcafbbb74da16b630715015956cbaa62f1722008b (patch)
tree5d2be756ffe9fea360213939615d21d1377a1347 /dev-util
parentmedia-video/obs-studio: wire up tests (diff)
downloadgentoo-cafbbb74da16b630715015956cbaa62f1722008b.tar.gz
gentoo-cafbbb74da16b630715015956cbaa62f1722008b.tar.bz2
gentoo-cafbbb74da16b630715015956cbaa62f1722008b.zip
dev-util/perf: mirror kernel restrictions for libdw support
Kernel has a whitelist of architectures for which unwind via libdw is supported. Right now the ebuild unconditionally enables it, this fails on architectures where kernel support is not merged (e.g. alpha). This list needs to be checked and synced on updates. There shouldn't be anything removed from it in the future, only added. Bug: https://bugs.gentoo.org/759754 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/34376 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/perf/perf-6.3.ebuild15
-rw-r--r--dev-util/perf/perf-6.5.ebuild16
-rw-r--r--dev-util/perf/perf-6.6.ebuild16
3 files changed, 44 insertions, 3 deletions
diff --git a/dev-util/perf/perf-6.3.ebuild b/dev-util/perf/perf-6.3.ebuild
index 7969607f7994..e3f009470d74 100644
--- a/dev-util/perf/perf-6.3.ebuild
+++ b/dev-util/perf/perf-6.3.ebuild
@@ -179,6 +179,19 @@ perf_make() {
local arch=$(tc-arch-kernel)
local java_dir
use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+ # sync this with the whitelist in tools/perf/Makefile.config
+ local disable_libdw
+ if ! use amd64 && ! use x86 && \
+ ! use arm && \
+ ! use arm64 && \
+ ! use ppc && ! use ppc64 \
+ ! use s390 && \
+ ! use riscv
+ then
+ disable_libdw=1
+ fi
+
# FIXME: NO_CORESIGHT
emake V=1 VF=1 \
HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \
@@ -204,7 +217,7 @@ perf_make() {
NO_LIBBIONIC=1 \
NO_LIBBPF= \
NO_LIBCRYPTO=$(puse crypt) \
- NO_LIBDW_DWARF_UNWIND= \
+ NO_LIBDW_DWARF_UNWIND="${disable_libdw}" \
NO_LIBELF= \
NO_LIBNUMA=$(puse numa) \
NO_LIBPERL=$(puse perl) \
diff --git a/dev-util/perf/perf-6.5.ebuild b/dev-util/perf/perf-6.5.ebuild
index 63a36103e1f1..128f4fd8b60a 100644
--- a/dev-util/perf/perf-6.5.ebuild
+++ b/dev-util/perf/perf-6.5.ebuild
@@ -212,6 +212,20 @@ perf_make() {
local arch=$(tc-arch-kernel)
local java_dir
use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+ # sync this with the whitelist in tools/perf/Makefile.config
+ local disable_libdw
+ if ! use amd64 && ! use x86 && \
+ ! use arm && \
+ ! use arm64 && \
+ ! use ppc && ! use ppc64 \
+ ! use s390 && \
+ ! use riscv && \
+ ! use loong
+ then
+ disable_libdw=1
+ fi
+
# FIXME: NO_CORESIGHT
local emakeargs=(
V=1 VF=1
@@ -241,7 +255,7 @@ perf_make() {
NO_LIBBPF=$(puse bpf)
NO_LIBCAP=$(puse caps)
NO_LIBCRYPTO=$(puse crypt)
- NO_LIBDW_DWARF_UNWIND=
+ NO_LIBDW_DWARF_UNWIND="${disable_libdw}"
NO_LIBELF=
NO_LIBNUMA=$(puse numa)
NO_LIBPERL=$(puse perl)
diff --git a/dev-util/perf/perf-6.6.ebuild b/dev-util/perf/perf-6.6.ebuild
index b86fbd604b85..762843d662bf 100644
--- a/dev-util/perf/perf-6.6.ebuild
+++ b/dev-util/perf/perf-6.6.ebuild
@@ -209,6 +209,20 @@ perf_make() {
local arch=$(tc-arch-kernel)
local java_dir
use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+ # sync this with the whitelist in tools/perf/Makefile.config
+ local disable_libdw
+ if ! use amd64 && ! use x86 && \
+ ! use arm && \
+ ! use arm64 && \
+ ! use ppc && ! use ppc64 \
+ ! use s390 && \
+ ! use riscv && \
+ ! use loong
+ then
+ disable_libdw=1
+ fi
+
# FIXME: NO_CORESIGHT
local emakeargs=(
V=1 VF=1
@@ -237,7 +251,7 @@ perf_make() {
NO_LIBBPF=$(puse bpf)
NO_LIBCAP=$(puse caps)
NO_LIBCRYPTO=$(puse crypt)
- NO_LIBDW_DWARF_UNWIND=
+ NO_LIBDW_DWARF_UNWIND="${disable_libdw}"
NO_LIBELF=
NO_LIBNUMA=$(puse numa)
NO_LIBPERL=$(puse perl)