Expose %_hardening_{c,ld}flags independently to make it easier for packages to apply them to selected components
This commit is contained in:
parent
8174ec3d10
commit
5034f24e6a
9
macros
9
macros
@ -185,9 +185,12 @@ unset DISPLAY\
|
|||||||
%__find_provides /usr/lib/rpm/redhat/find-provides
|
%__find_provides /usr/lib/rpm/redhat/find-provides
|
||||||
%__find_requires /usr/lib/rpm/redhat/find-requires
|
%__find_requires /usr/lib/rpm/redhat/find-requires
|
||||||
|
|
||||||
# define _hardened_build to non-zero to enable
|
%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
||||||
%_hardened_cflags %{?_hardened_build:-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1}
|
%_hardening_ldflags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
|
||||||
%_hardened_ldflags %{?_hardened_build:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld}
|
|
||||||
|
#_hardened_build 0
|
||||||
|
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
|
||||||
|
%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}
|
||||||
|
|
||||||
%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 %{_hardened_cflags}
|
%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 %{_hardened_cflags}
|
||||||
%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}
|
%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}
|
||||||
|
Loading…
Reference in New Issue
Block a user