Skip to content

Commit 392e272

Browse files
committed
[redhat] perf: switch back to static linking of libbpf
JIRA: https://issues.redhat.com/browse/RHEL-121921 Upstream Status: RHEL-only description =========== Revisiting the approach of libbpf linking in perf: Since the core of libbpf code lies in the same repository/SRPM as perf comes from, the problem with having to rebuild perf once a bug is fixed in the library is not a thing. So finally, through the libbpf package we got the fixes later than when linked statically against the library from the same source tree. Static linking also allows us to adapt to API changes instantly. Finally, this change aligns with what we have in Fedora/ARK now. With this change, perf is no more dependent on libbpf{,-devel} RPM. Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent ec6a7a1 commit 392e272

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

redhat/kernel.spec.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,6 @@ BuildRequires: sparse
644644
BuildRequires: zlib-devel binutils-devel newt-devel perl(ExtUtils::Embed) bison flex xz-devel
645645
BuildRequires: audit-libs-devel python3-setuptools
646646
BuildRequires: java-devel
647-
BuildRequires: libbpf-devel >= 0.6.0-1
648647
BuildRequires: libbabeltrace-devel
649648
BuildRequires: libtraceevent-devel
650649
%ifnarch %{arm} s390x
@@ -2613,7 +2612,7 @@ InitBuildVars
26132612
%global perf_build_extra_opts CORESIGHT=1
26142613
%endif
26152614
%global perf_make \
2616-
%{__make} %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_CXXFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags} -Wl,-E" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBBPF_DYNAMIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3}
2615+
%{__make} %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_CXXFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags} -Wl,-E" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3}
26172616
%if %{with_perf}
26182617
# perf
26192618
# make sure check-headers.sh is executable

0 commit comments

Comments
 (0)