I recently built gcc 4.5 from source. That took a bit of doing, but
eventually I got to working. Since I don't have admin on this machine,
I set the --prefix to /u1/public/gcc and make installed it there.
I am now able to compile with g++ 4.5. To help, I did
alias g++0x /u1/public/gcc/bin/g++ -std=c++0x
However, linking doesn't yet work. I got:
/usr/bin/ld: cannot find -lgcc_s
And when I changed the alias to include
-L/u1/public/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/
-L/u1/public/gcc/lib/gcc/x86_64-unknown-linux-gnu/lib/
then I got
/usr/bin/ld: skipping incompatible
/u1/public/gcc/lib/gcc/x86_64-unknown-linux-gnu/lib//libgcc_s.so when
searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
Any ideas? My Google searches have turned up some problems trying to
cross-compile 32-bit and 64-bit programs, but I'm not doing that----I'm
purely working in 64 bit here. And I'm not (yet) linking in any
3rd-party libraries, although eventually I will.