diff --git a/gcc/configure b/gcc/configure index abc8bfdc24432..229d1a0859f0d 100755 --- a/gcc/configure +++ b/gcc/configure @@ -5468,13 +5468,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# Remove the -O2: for historical reasons, unless bootstrapping we prefer -# optimizations to be activated explicitly by the toplevel. -case "$CC" in - */prev-gcc/xgcc*) ;; - *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" ` - CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" ` ;; -esac diff --git a/gcc/configure.ac b/gcc/configure.ac index 1d2cefa3f6a37..6bada4c15af76 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -463,13 +463,6 @@ ACX_PROG_GDC([-I"$srcdir"/d]) # Do configure tests with the C++ compiler, since that's what we build with. AC_LANG(C++) -# Remove the -O2: for historical reasons, unless bootstrapping we prefer -# optimizations to be activated explicitly by the toplevel. -case "$CC" in - */prev-gcc/xgcc*) ;; - *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` - CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` ;; -esac AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(GDCFLAGS)