specfile: build flags modified so koji no longer drops hardening flags

Resolves: #1406688
This commit is contained in:
David Kaspar [Dee'Kej] 2017-02-23 16:34:00 +01:00
parent a18f99cf72
commit 2b62e65299

View File

@ -81,11 +81,17 @@ if as --help | grep -q execstack; then
# the object files do not require an executable stack
export CCAS="gcc -c -Wa,--noexecstack"
fi
# Dummy invocation to initialization CFLAGS etc.
%global _configure :
%configure
mkdir base
cd base
ln -s ../configure .
%ifarch %{ix86}
export CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")" -march=i686"
export CFLAGS=$(echo $CFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-g -march=i686"
export CXXFLAGS=$(echo $CXXFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-g -march=i686"
%endif
./configure --enable-fat --build=%{_build} --host=%{_host} \
--program-prefix=%{?_program_prefix} \
@ -108,7 +114,7 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|-lstdc++ -lm|-lstdc++|' \
-i libtool
export LD_LIBRARY_PATH=`pwd`/.libs
make CFLAGS="$RPM_OPT_FLAGS -g" CXXFLAGS="$RPM_OPT_FLAGS -g" %{?_smp_mflags}
make %{?_smp_mflags}
cd ..
#%ifarch %{ix86}
#mkdir build-sse2
@ -252,6 +258,7 @@ exit 0
%changelog
* Fri Feb 17 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 1:6.1.2-3
- Explicitly added '-g' option into CFLAGS & CXXFLAGS to correctly build .debug_info for i386
- Build flags modified so the build system no longer drops LDFLAGS hardening flags
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild