https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96378
--- Comment #5 from Nick Briggs <nicholas.h.briggs at gmail dot com> --- Thanks! configuring with --enable-checking=release allowed it to compile. The final configure that I used was: ../gcc-master/configure prefix=/opt/gcc --disable-werror --enable-checking=release CC="gcc -m64" CXX="g++ -m64" --build=sparcv9-sun-solaris2.11 --with-gnu-as --with-as=/opt/bin utils/bin/as --without-gnu-ld --with-ld=/usr/bin/ld build_alias=sparcv9-sun-solaris2.11 --enable-languages=c There was one hiccup -- the install step wants to compile: g++ -m64 -std=c++11 -fno-PIE -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-master/gcc -I../../gcc-master/gcc/. -I../../gcc-master/gcc/../include -I../../gcc-master/gcc/../libcpp/include -I../../gcc-master/gcc/../libcody -I/export/home/briggs/gcc-master-objdir/./gmp -I/export/home/briggs/gcc-master/gmp -I/export/home/briggs/gcc-master-objdir/./mpfr/src -I/export/home/briggs/gcc-master/mpfr/src -I/export/home/briggs/gcc-master/mpc/src -I../../gcc-master/gcc/../libdecnumber -I../../gcc-master/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-master/gcc/../libbacktrace -I/export/home/briggs/gcc-master-objdir/./isl/include -I/export/home/briggs/gcc-master/isl/include -o cc1-checksum.o -MT cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c cc1plus: error: -Werror=format-diag: no option -Wformat-diag however it appears to be using whatever g++ was already installed, and that g++ (7.3.0) is too old to know "-Wno-error=format-diag". The answer was to "gmake -i install" which managed to get a new g++ installed, and then "gmake install" again with the new g++ on the path to get an error-free install. Final result is: $ /opt/gcc/bin/gcc -v Using built-in specs. COLLECT_GCC=/opt/gcc/bin/gcc COLLECT_LTO_WRAPPER=/opt/gcc/libexec/gcc/sparcv9-sun-solaris2.11/11.0.0/lto-wrapper Target: sparcv9-sun-solaris2.11 Configured with: ../gcc-master/configure prefix=/opt/gcc --disable-werror --enable-checking=release CC='gcc -m64' CXX='g++ -m64' --build=sparcv9-sun-solaris2.11 --with-gnu-as --with-as=/opt/binutils/bin/as --without-gnu-ld --with-ld=/usr/bin/ld build_alias=sparcv9-sun-solaris2.11 --enable-languages=c Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20201217 (experimental) (GCC)