Skip to content

Commit

Permalink
RPM: Pass hardening flags into LDFLAGS when building logger
Browse files Browse the repository at this point in the history
  • Loading branch information
solardiz committed Feb 2, 2025
1 parent 54da909 commit 1097a98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lkrg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Summary: Linux Kernel Runtime Guard (LKRG)
Name: lkrg
Version: 0.9.9
Release: 1%{?dist}
Release: 4%{?dist}
License: GPLv2
URL: https://lkrg.org
Source: https://lkrg.org/download/%name-%version.tar.gz
Expand Down Expand Up @@ -36,7 +36,7 @@ Userspace tools to support Linux Kernel Runtime Guard (LKRG) remote logging.

%build
make %{?_smp_mflags} KERNEL=/usr/src/kernels/%kmod_headers_version
make -C logger %{?_smp_mflags} CFLAGS='%optflags'
make -C logger %{?_smp_mflags} CFLAGS='%optflags' LDFLAGS='-s -pie -Wl,-z,defs -Wl,-z,relro -Wl,-z,now %optflags'

%install
rm -rf %buildroot
Expand Down Expand Up @@ -85,6 +85,10 @@ fi
%dir %attr(0750,lkrg-logger,lkrg-logger) /var/log/lkrg-logger

%changelog
* Fri Jan 31 2025 Solar Designer <[email protected]> 0.9.9-4
- Pass -s -pie -Wl,-z,defs -Wl,-z,relro -Wl,-z,now and optflags into LDFLAGS
when building the logger userspace binaries

* Wed Oct 23 2024 Solar Designer <[email protected]> 0.9.9-1
- Update to 0.9.9

Expand Down

0 comments on commit 1097a98

Please sign in to comment.