From f69745d156f7a1bac1128e748aa35046074c6645 Mon Sep 17 00:00:00 2001 From: misaka00251 Date: Wed, 22 Feb 2023 14:10:37 +0800 Subject: [PATCH] fix RISC-V build errors (cherry picked from commit d2032fa1c8d3aef48218bc0a8db2a19273d6f8da) --- lxc.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lxc.spec b/lxc.spec index 339bd88..00230fe 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022102410 +%global _release 2022102411 Name: lxc Version: 4.0.3 @@ -37,6 +37,9 @@ BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) BuildRequires: libcap libcap-devel libselinux-devel yajl yajl-devel BuildRequires: pkgconfig(bash-completion) +%ifarch riscv64 +BuildRequires: libatomic_ops +%endif Requires: lxc-libs = 4.0.3-%{release} @@ -89,6 +92,9 @@ This package contains documentation for lxc for creating containers. %autosetup -n lxc-4.0.3 -Sgit -p1 %build +%ifarch riscv64 +export LDFLAGS="%{build_ldflags} -latomic -pthread" +%endif %configure --enable-doc --enable-api-docs \ --disable-silent-rules --docdir=%{_pkgdocdir} --disable-rpath \ --disable-static --disable-apparmor --enable-selinux \ @@ -212,6 +218,12 @@ rm -rf %{buildroot}%{_sysconfdir}/default/%{name} %endif %changelog +* Wed Feb 22 2023 misaka00251 - 4.0.3-2022102411 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: fix RISC-V build errors + * Fri Feb 17 2023 zhangxiaoyu - 4.0.3-2022102410 - Type:bugfix - ID:NA -- Gitee