add spec options -Werror -Wl,z,noexecstack

This commit is contained in:
zhang-mingyi66 2023-04-28 19:53:44 +08:00
parent 594e09f740
commit 3d6b6309df

View File

@ -4,7 +4,7 @@
Name: %{githubname} Name: %{githubname}
Version: %{githubver} Version: %{githubver}
Release: 4 Release: 5
Summary: Libbpf library Summary: Libbpf library
License: LGPLv2 or BSD License: LGPLv2 or BSD
@ -54,7 +54,7 @@ Requires: %{name}-devel = 2:%{version}-%{release}
The %{name}-static package contains static library for The %{name}-static package contains static library for
developing applications that use %{name} developing applications that use %{name}
%global make_flags DESTDIR=%{buildroot} OBJDIR=%{_builddir} CFLAGS="%{build_cflags} -fPIC" LDFLAGS="%{build_ldflags} -Wl,--no-as-needed" LIBDIR=/%{_libdir} NO_PKG_CONFIG=1 %global make_flags DESTDIR=%{buildroot} OBJDIR=%{_builddir} CFLAGS="%{build_cflags} -fPIC -Werror" LDFLAGS="%{build_ldflags} -Werror -Wl,--no-as-needed -Wl,-z,noexecstack" LIBDIR=/%{_libdir} NO_PKG_CONFIG=1
%prep %prep
%autosetup -n %{githubfull} -p1 %autosetup -n %{githubfull} -p1
@ -78,6 +78,9 @@ developing applications that use %{name}
%{_libdir}/libbpf.a %{_libdir}/libbpf.a
%changelog %changelog
* Thu May 4 2023 zhangmingyi <zhangmingyi5@huawei.com> -2:0.8.1-5
- add -Werror -Wl,-z,noexecstack options
* Thu Feb 23 2023 JofDiamonds <kwb0523@163.com> -2:0.8.1-4 * Thu Feb 23 2023 JofDiamonds <kwb0523@163.com> -2:0.8.1-4
- backport patches from upstream: - backport patches from upstream:
backport-libbpf-Fix-overrun-in-netlink-attribute-iteration.patch backport-libbpf-Fix-overrun-in-netlink-attribute-iteration.patch