https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61763
--- Comment #9 from Douglas Mencken <dougmencken at gmail dot com> --- >How do you actually compile with -O3? ../../flags_O2_to_O3.sh sed -i '/ CFLAGS_FOR_TARGET=/{n;N;N;N;N;N;N;N;d}' ./configure.ac sed -i '/ CXXFLAGS_FOR_TARGET=/{n;N;N;N;N;N;N;N;d}' ./configure.ac sed -i 's/-c -g conftest/-c conftest/' ./configure.ac sed -i 's/stage1_cflags="-g/stage1_cflags="/' ./configure.ac Where flags_O2_to_O3.sh script is http://ftp.osuosl.org/pub/manulix/scripts/service-scripts/flags_O2_to_O3.sh