diff --git a/macros b/macros index 9532fa2..fbe3186 100644 --- a/macros +++ b/macros @@ -32,10 +32,10 @@ # way to turn it back off. # %_configure_disable_silent_rules 1 %configure \ - CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ - CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ - FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \ - FCFLAGS="${FCFLAGS:-%optflags -I%_fmoddir}" ; export FCFLAGS ; \ + CFLAGS="${CFLAGS:-%__global_cflags}" ; export CFLAGS ; \ + CXXFLAGS="${CXXFLAGS:-%__global_cxxflags}" ; export CXXFLAGS ; \ + FFLAGS="${FFLAGS:-%__global_fflags}" ; export FFLAGS ; \ + FCFLAGS="${FCFLAGS:-%__global_fcflags}" ; export FCFLAGS ; \ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS; \ [ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find $(dirname %{_configure}) -name config.guess -o -name config.sub) ; do \ [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \ @@ -146,6 +146,11 @@ %_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}} %__global_compiler_flags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags} + +%__global_cflags %{optflags} +%__global_cxxflags %{optflags} +%__global_fflags %{optflags} -I%_fmoddir +%__global_fcflags %{optflags} -I%_fmoddir %__global_ldflags -Wl,-z,relro %{_hardened_ldflags} #============================================================================== diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index b06df87..6c220a0 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 58 +Version: 59 Release: 1%{?dist} # No version specified. License: GPL+ @@ -140,6 +140,10 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Wed Nov 30 2016 Panu Matilainen - 59-1 +- Move global compiler flags to __global_compiler_flags macro +- Introduce separate __global_fooflags for C, C++ and Fortran + * Tue Nov 29 2016 Panu Matilainen - 58-1 - Drop atom optimization on i686 (#1393492)