Skip to content

Commit b3f48ab

Browse files
committed
[redhat] perf: switch back to static linking of libbpf
JIRA: https://issues.redhat.com/browse/RHEL-121919 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 b8bd692 commit b3f48ab

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
@@ -750,7 +750,6 @@ BuildRequires: sparse
750750
BuildRequires: zlib-devel binutils-devel newt-devel perl(ExtUtils::Embed) bison flex xz-devel
751751
BuildRequires: audit-libs-devel python3-setuptools
752752
BuildRequires: java-devel
753-
BuildRequires: libbpf-devel >= 0.6.0-1
754753
BuildRequires: libbabeltrace-devel
755754
BuildRequires: libtraceevent-devel
756755
%ifnarch s390x
@@ -3101,7 +3100,7 @@ fi
31013100
%global perf_build_extra_opts CORESIGHT=1
31023101
%endif
31033102
%global perf_make \
3104-
%{__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 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBBPF_DYNAMIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3}
3103+
%{__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 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3}
31053104
%if %{with_perf}
31063105
%{log_msg "Build perf"}
31073106
# perf

0 commit comments

Comments
 (0)