When using a version of GCC that does not support -Wno-long-long as the bootstrap compiler (such as GCC 2.8.1), it is not possible to build GCC 4.0: gcc -I../../gcc-head/libcpp -I. -I../../gcc-head/libcpp/../include -I../../gcc-head/libcpp/include -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -I../../gcc-head/libcpp -I. -I../../gcc-head/libcpp/../include -I../../gcc-head/libcpp/include -c ../../gcc-head/libcpp/charset.c cc1: Invalid option `-Wno-long-long' make[1]: *** [charset.o] Error 1 make[1]: Leaving directory `/home/charlet/cvs/gcc-obj/libcpp' make: *** [all-libcpp] Error 2
Can you attach the config.log for libcpp? Because we do check for -Wno-long-long in configure: ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long]) Did you change CC after configuring?
This works for me, you had to have changed compilers between configuring and building.