From 34ab31c91d90137f56a252def1edb1833cdf8070 Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 28 Nov 2024 02:28:06 +0000 Subject: [PATCH] gentoo: gcc: don't try to sed CFLAGS Bug: https://bugs.gentoo.org/849722 Bug: https://github.com/InBetweenNames/gentooLTO/issues/846 Bug: https://github.com/vaeth/portage-bashrc-mv/issues/11 --- gcc/configure | 7 ------- gcc/configure.ac | 7 ------- 2 files changed, 14 deletions(-) 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)