Yes.. corepure64 v5.4.
I don't think that that path is the gcc in use, but is rather the new gcc that is being compiled with gfortran. Or possibly something from one of gcc's 3-stage bootstrap layers? I don't know... for that particular build attempt I had removed -disable-bootstrap to see if bootstrapping would fix the issue.
Running compilation exactly as indicated in the script at the end of the original post (with -disable-bootstrap), I get the same problem, per below. I've also shown the gcc in use:
admin@box:~/tmp/gcc-4.7.2$ which gcc
/usr/local/bin/gcc
admin@box:~/tmp/gcc-4.7.2$ ls -al `which cc`
lrwxrwxrwx 1 root root 32 Jan 26 04:04 /usr/local/bin/cc -> /tmp/tcloop/gcc/usr/local/bin/cc
admin@box:~/tmp/gcc-4.7.2$
admin@box:~/tmp/gcc-4.7.2$ ./configure --prefix=$OUTPUT_DIR --enable-clocale=generic --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++,fortran --disable-libstdcxx-pch --enable-c99 --enable-long-long --disable-bootstrap
<snip>
<snip>
<snip>
checking whether ln -s works... yes
checking for x86_64-unknown-linux-gnu-gcc... /home/admin/tmp/gcc-4.7.2/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/admin/tmp/gcc-4.7.2/host-x86_64-unknown-linux-gnu/gcc/ -B/home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/bin/ -B/home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/lib/ -isystem /home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/include -isystem /home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/sys-include -m32
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/admin/tmp/gcc-4.7.2/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/admin/tmp/gcc-4.7.2/host-x86_64-unknown-linux-gnu/gcc/ -B/home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/bin/ -B/home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/lib/ -isystem /home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/include -isystem /home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/sys-include -m32 accepts -g... yes
checking for /home/admin/tmp/gcc-4.7.2/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/admin/tmp/gcc-4.7.2/host-x86_64-unknown-linux-gnu/gcc/ -B/home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/bin/ -B/home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/lib/ -isystem /home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/include -isystem /home/admin/tmp/gfortran-build/x86_64-unknown-linux-gnu/sys-include -m32 option to accept ISO C89... unsupported
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/home/admin/tmp/gcc-4.7.2/x86_64-unknown-linux-gnu/32/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/home/admin/tmp/gcc-4.7.2'
make: *** [all] Error 2
admin@box:~/tmp/gcc-4.7.2$
admin@box:~/tmp/gcc-4.7.2$
admin@box:~/tmp/gcc-4.7.2$ which gcc
/usr/local/bin/gcc
admin@box:~/tmp/gcc-4.7.2$ ls -al `which cc`
lrwxrwxrwx 1 root root 32 Jan 26 04:04 /usr/local/bin/cc -> /tmp/tcloop/gcc/usr/local/bin/cc
Also note that, with the script in the first post, intent is to compile the gfortran version that exactly matches the gcc in the tce repo used to compile other stuff. Not sure if this is required, but it seems like the safest bet.