I am trying to get a modern GCC to compile on Centos 6.4. The problem is that Centos does not have a modern glibc and GCC 4.8.x and 4.7.x keep giving me the following compile error:
... -DL_gcov -c ../../.././libgcc/libgcov.c In file included from /usr/include/features.h:385:0, from /usr/include/stdio.h:28, from ../../.././libgcc/../gcc/tsystem.h:88, from ../../.././libgcc/libgcov.c:29: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
The problem here is the
gnu/stubs-32.h is part of the modern
glibc and Centos 6.4 doesn't seem to have it. I've tried building my own
glibc but as soon as it gets installed and in my local
LD_LIBRARY_PATH I can't run any other programs, because all of the existing executables on the system try to link against it and they fail.
I want to use the new compiler because it has dramatically better handling of C++ STL code, and because the optimizer in GCC 4.8 makes my code run in 1/2 the time as the GCC 4.4.7 compiler that comes with Centos.
Any suggestions on how to do this?