JoÃo Carlos Martins <ttilt@xxxxxxxxxxxxxxxxx> writes: > I searched for this question in the mailing lists but found no > answers, so I'm sending this e-mail. > > Q1) how can I build only the C/C++ libraries that comes with the > compiler source and not the whole compiler (support libraries, libgcc > etc)? It may work to delete the gcc directory from your sources, and then compile. Naturally you will need an appropriate version of gcc on your PATH. I haven't tried this for several years, but it did work in the past. > Optionally, how can i build them to be static and not shared? Use --disable-shared when you run configure. > Q2) Suppose I install a new version of gcc. ItÂs installed in the > default prefix (/usr/local) and I want to use that version instead of > the default older version in prefix /usr. I set an environment var > like 'export GCC=/usr/local/bin/gcc' and use that in my makefiles. The > question is, will the C/C++ shared libraries used be the ones that > came w/ this new compiler, which are located in /usr/local/lib or the > system default ones in /usr/lib? What if I use -L/usr/local/lib, will > that override the use of the default libraries? At link time gcc should normally pick up the libstdc++ with which it was installed. At run time it depends upon whether you pass a -R option, and/or set LD_LIBRARY_PATH. Ian