specfile: fix the build process for ix86 family

The FLAGS must be edited before calling %configure so they are
  properly set in the Makefile.
This commit is contained in:
David Kaspar [Dee'Kej] 2017-03-13 13:05:21 +01:00
parent 984d6a8253
commit 4b9c62bd11

View File

@ -82,13 +82,13 @@ if as --help | grep -q execstack; then
export CCAS="gcc -c -Wa,--noexecstack"
fi
%configure --enable-cxx
%ifarch %{ix86}
export CFLAGS=$(echo $CFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-march=i686"
export CXXFLAGS=$(echo $CXXFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-march=i686"
export CFLAGS=$(echo %{optflags} | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-march=i686"
export CXXFLAGS=$(echo %{optflags} | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-march=i686"
%endif
%configure --enable-cxx
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
-e 's|-lstdc++ -lm|-lstdc++|' \