diff --git a/macros b/macros index 237e1f4..95aee3a 100644 --- a/macros +++ b/macros @@ -185,9 +185,12 @@ unset DISPLAY\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires -# define _hardened_build to non-zero to enable -%_hardened_cflags %{?_hardened_build:-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1} -%_hardened_ldflags %{?_hardened_build:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld} +%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 +%_hardening_ldflags -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_ldflags -Wl,-z,relro %{_hardened_ldflags}