dev-util/perf: Sync with Gentoo

It's from Gentoo commit 6ef4a840b76f607d38196344e9d2fd19d3142dd4.
This commit is contained in:
Flatcar Buildbot 2024-01-15 07:12:18 +00:00 committed by Krzesimir Nowak
parent f1c423854f
commit 5f8db77d52
3 changed files with 29 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=7 EAPI=7
@ -41,8 +41,8 @@ BDEPEND="
${PYTHON_DEPS} ${PYTHON_DEPS}
>=app-arch/tar-1.34-r2 >=app-arch/tar-1.34-r2
dev-python/setuptools[${PYTHON_USEDEP}] dev-python/setuptools[${PYTHON_USEDEP}]
sys-devel/bison app-alternatives/yacc
sys-devel/flex app-alternatives/lex
virtual/pkgconfig virtual/pkgconfig
doc? ( doc? (
app-text/asciidoc app-text/asciidoc

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
@ -44,8 +44,8 @@ BDEPEND="
${PYTHON_DEPS} ${PYTHON_DEPS}
>=app-arch/tar-1.34-r2 >=app-arch/tar-1.34-r2
dev-python/setuptools[${PYTHON_USEDEP}] dev-python/setuptools[${PYTHON_USEDEP}]
sys-devel/bison app-alternatives/yacc
sys-devel/flex app-alternatives/lex
virtual/pkgconfig virtual/pkgconfig
doc? ( doc? (
app-text/asciidoc app-text/asciidoc

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
@ -31,7 +31,7 @@ SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
IUSE="audit babeltrace bpf caps crypt debug +doc gtk java libpfm +libtraceevent +libtracefs lzma numa perl python slang systemtap tcmalloc unwind zstd" IUSE="abi_mips_o32 abi_mips_n32 abi_mips_n64 audit babeltrace big-endian bpf caps crypt debug +doc gtk java libpfm +libtraceevent +libtracefs lzma numa perl python slang systemtap tcmalloc unwind zstd"
REQUIRED_USE=" REQUIRED_USE="
${PYTHON_REQUIRED_USE} ${PYTHON_REQUIRED_USE}
@ -43,8 +43,8 @@ BDEPEND="
${PYTHON_DEPS} ${PYTHON_DEPS}
>=app-arch/tar-1.34-r2 >=app-arch/tar-1.34-r2
dev-python/setuptools[${PYTHON_USEDEP}] dev-python/setuptools[${PYTHON_USEDEP}]
sys-devel/bison app-alternatives/yacc
sys-devel/flex app-alternatives/lex
virtual/pkgconfig virtual/pkgconfig
doc? ( doc? (
app-text/asciidoc app-text/asciidoc
@ -223,11 +223,29 @@ perf_make() {
disable_libdw=1 disable_libdw=1
fi fi
# perf directly invokes LD for linking without going through CC, on mips
# it is required to specify the emulation. port of below buildroot patch
# https://patchwork.ozlabs.org/project/buildroot/patch/20170217105905.32151-1-Vincent.Riera@imgtec.com/
local linker="$(tc-getLD)"
if use mips
then
if use big-endian
then
use abi_mips_n64 && linker+=" -m elf64btsmip"
use abi_mips_n32 && linker+=" -m elf32btsmipn32"
use abi_mips_o32 && linker+=" -m elf32btsmip"
else
use abi_mips_n64 && linker+=" -m elf64ltsmip"
use abi_mips_n32 && linker+=" -m elf32ltsmipn32"
use abi_mips_o32 && linker+=" -m elf32ltsmip"
fi
fi
# FIXME: NO_CORESIGHT # FIXME: NO_CORESIGHT
local emakeargs=( local emakeargs=(
V=1 VF=1 V=1 VF=1
HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)"
CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" NM="$(tc-getNM)" CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="${linker}" NM="$(tc-getNM)"
PKG_CONFIG="$(tc-getPKG_CONFIG)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
prefix="${EPREFIX}/usr" bindir_relative="bin" prefix="${EPREFIX}/usr" bindir_relative="bin"
tipdir="share/doc/${PF}" tipdir="share/doc/${PF}"