From 5a8467d5016b5a0bbd74fe0c7ba2c3e18b8912c1 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Tue, 14 Nov 2023 03:34:09 +0000 Subject: [PATCH] disable luajit and bpftool for loongarch64 --- bcc.spec | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/bcc.spec b/bcc.spec index 1c2f33f..3b36eee 100644 --- a/bcc.spec +++ b/bcc.spec @@ -1,5 +1,12 @@ -%define anolis_release 1 +%define anolis_release 2 +%ifarch loongarch64 +%bcond_without ignore_lua +%bcond_with libbpf_tools +%else %bcond_with ignore_lua +%bcond_without libbpf_tools +%endif + Name: bcc Version: 0.27.0 @@ -80,7 +87,7 @@ Requires: python3-netaddr %description tools Command line tools for BPF Compiler Collection (BCC) - +%if %{with libbpf_tools} %package -n libbpf-tools Summary: Command line libbpf tools for BPF Compiler Collection (BCC) BuildRequires: libbpf-devel >= 0.0.5, libbpf-static >= 0.0.5 @@ -88,6 +95,7 @@ BuildRequires: bpftool %description -n libbpf-tools Command line libbpf tools for BPF Compiler Collection (BCC) +%endif %prep %autosetup -p1 @@ -98,7 +106,7 @@ Command line libbpf tools for BPF Compiler Collection (BCC) -DCMAKE_USE_LIBBPF_PACKAGE:BOOL=TRUE \ -DENABLE_LLVM_SHARED=1 %cmake_build - +%if %{with libbpf_tools} pushd libbpf-tools make BPFTOOL=bpftool LIBBPF_OBJ=%{_libdir}/libbpf.a CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" make DESTDIR=./tmp-install prefix= install @@ -113,6 +121,7 @@ make DESTDIR=./tmp-install prefix= install done ) popd +%endif %install %cmake_install @@ -131,8 +140,10 @@ mkdir -p %{buildroot}%{_docdir}/%{name} mv %{buildroot}%{_datadir}/%{name}/examples %{buildroot}%{_docdir}/%{name}/ rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/ +%if %{with libbpf_tools} mkdir -p %{buildroot}/%{_sbindir} install -p libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}/ +%endif %generate_compatibility_deps @@ -171,11 +182,16 @@ install -p libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}/ %{_bindir}/bcc-lua %endif +%if %{with libbpf_tools} %files -n libbpf-tools %{_sbindir}/bpf-* %{abidir}/bpf-*-option.list +%endif %changelog +* Tue Nov 14 2023 Wenlong Zhang - 0.27.0-2 +- disable luajit and bpftool for loongarch64 + * Mon Apr 17 2023 Funda Wang - 0.27.0-1 - New version 0.27.0 -- Gitee