diff --git a/gmp.spec b/gmp.spec index f3a15a0..42024d7 100644 --- a/gmp.spec +++ b/gmp.spec @@ -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++|' \