diff --git a/libbpf.changes b/libbpf.changes index 2757210..e6026b8 100644 --- a/libbpf.changes +++ b/libbpf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 10 18:28:17 UTC 2022 - Jeff Mahoney + +- Enable building and packaging of static library. + Explicitly enable fat LTO objects. + ------------------------------------------------------------------- Fri Mar 4 10:18:54 UTC 2022 - Jan Engelhardt diff --git a/libbpf.spec b/libbpf.spec index 8ba440f..8b097bb 100644 --- a/libbpf.spec +++ b/libbpf.spec @@ -48,17 +48,26 @@ Requires: linux-glibc-devel >= 5.16 %description devel libbpf is a C library which provides API for managing eBPF programs and maps. +%package devel-static +Summary: Static library for libbpf +Requires: %{libname} = %{version} +Requires: %{name}-devel = %{version} +Requires: linux-glibc-devel >= 5.16 + +%description devel-static +libbpf is a C library which provides API for managing eBPF programs and maps. + %prep %autosetup %build +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects cd src %make_build V=1 CFLAGS="%{optflags}" %install cd src %make_install V=1 -rm -f %{buildroot}%{_libdir}/%{name}.a %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig @@ -73,4 +82,7 @@ rm -f %{buildroot}%{_libdir}/%{name}.a %{_libdir}/%{name}.so %{_libdir}/pkgconfig/%{name}.pc +%files devel-static +%{_libdir}/%{name}.a + %changelog