From 2611bfa4ba7d63781f2a903460e490cf40911ee0 Mon Sep 17 00:00:00 2001 From: Viktor Malik Date: Thu, 16 May 2024 17:24:37 +0200 Subject: [PATCH] Enable LTO Related: RHEL-30627 By default, Fedora's libbpf has LTO turned off (probably for historical reasons). Since RHEL has more strict hardening checks, we need to enable it. Signed-off-by: Viktor Malik --- libbpf.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libbpf.spec b/libbpf.spec index 37cade2..b84bcb8 100644 --- a/libbpf.spec +++ b/libbpf.spec @@ -9,7 +9,7 @@ Name: libbpf Version: 1.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Libbpf library License: LGPL-2.1-only OR BSD-2-Clause @@ -45,8 +45,6 @@ Requires: %{name}-devel = 2:%{version}-%{release} The %{name}-static package contains static library for developing applications that use %{name} -%define _lto_cflags %{nil} - %global libbpf_make \ make prefix=%{_prefix} DESTDIR=%{buildroot} OBJDIR=%{_builddir} CFLAGS="%{build_cflags} -fPIC" LDFLAGS="%{build_ldflags} -Wl,--no-as-needed" LIBDIR=/%{_libdir} NO_PKG_CONFIG=1