From 8dabcc596e8ebda218027f848ac458d3e07258e5 Mon Sep 17 00:00:00 2001 From: jchzhou Date: Mon, 1 Apr 2024 16:26:00 +0800 Subject: [PATCH] add a parameter for disabling LTO when building with clang & ld.bfd Signed-off-by: jchzhou (cherry picked from commit 6e654b2fceb71e5152fa5aa0312a96c3ccd3a988) --- lxc.spec | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lxc.spec b/lxc.spec index 4de180b..761d594 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,5 +1,5 @@ -%global _release 13 -%global enable_isulad 1 +%global _release 14 +%bcond isulad 1 Name: lxc Version: 5.0.2 @@ -88,11 +88,13 @@ This package contains documentation for lxc for creating containers. %ifarch riscv64 export LDFLAGS="%{build_ldflags} -latomic -pthread" %endif -%if 0%{?enable_isulad} -meson setup -Disulad=true -Dtests=true -Dprefix=/usr build -%else -meson setup -Disulad=false -Dtests=true -Dprefix=/usr build +meson setup -Dtests=true \ + %{?with_isulad:-Disulad=true} \ + %{!?with_isulad:-Disulad=false} \ +%if "%{?toolchain}" == "clang" + -Db_lto=false \ %endif + -Dprefix=/usr build meson compile -C build %install @@ -193,7 +195,7 @@ meson test -C build %{_datadir}/%{name}/config/* %dir %{_datadir}/%{name}/__pycache__ %{_datadir}/%{name}/__pycache__/* -%if !0%{?enable_isulad} +%if %{without isulad} %{_datadir}/%{name}/hooks %endif @@ -212,6 +214,12 @@ meson test -C build %endif %changelog +* Mon Mar 11 2024 jchzhou - 5.0.2-14 +- Type: bugfix +- ID:NA +- SUG:NA +- DESC: update meson parameters for disabling LTO when building with clang & ld.bfd + * Mon Feb 26 2024 jikai - 5.0.2-13 - Type: bugfix - ID:NA -- Gitee