I just installed a gcc-4.7.2 in my home directory (non-root). As per the link here, i followed the instructions, installed gmp, mpfr, mpc, libelf and then gcc-4.7.2.
I downloaded the latest gmp, mpfr, mpc, libelf from their websites. But I wanted to install gcc-4.7.2 with them.
my configure options for gcc were :
./configure --enable-libstdcxx-threads
--enable-libstdcxx-time=yes
--disable-shared
--enable-static
--disable-bootstrap
--enable-libstdcxx-pch
--enable-libgomp
--enable-lto
--enable-threads=posix
--enable-tls
--prefix=/home/gcc-4.7.2
--with-gmp=/home/packages/gcctemp
--with-mpfr=/home/packages/gcctemp
--with-mpc=/home/packages/gcctemp
--with-libelf=/home/packages/gcctemp
--with-fpmath=sse
--enable-languages=c,c++
I set the environment variables correctly. When I compile a sample c++11 code, I get the error as :
ld: cannot find -lgcc_s
I searched the forums and found libgcc.a in the two locations
./lib/gcc/x86_64-unknown-linux-gnu/4.7.2/libgcc.a
./lib/gcc/x86_64-unknown-linux-gnu/4.7.2/32/libgcc.a
But I did not find any libgcc_s.so / libgcc_s.so.1 file in the installation folder.
How do i solve this problem ? Was there something wrong in my gcc configuration
PS: I do have gcc-4.9 installed in my home directory as well following the same installation instructions and I could locate the libgcc_s.so files in gcc-4.9.
Can I copy those .so files into gcc-4.7.2 lib and lib64 folders ?