"Khimenko Victor" wrote:
I'm not know if it's right thing to do. Internal gcc libraries are installed in <prefix>/lib/gcc-lib/<platform>/<version>/ on purpose and not just since "so happens" (libstdc++ is installed there as well while shared version of library is installed in <prefix>/lib :-)
On my gcc-2.95.2 installation, both libstdc++.{a,so} are symlinks to the ones in /usr/lib.
libgcc.a depends on libc, BTW. "C" part of libgcc.a is more or less stable now (AFAIK anyway). So usually it works. But "C++" part (at least C++ part!) of libgcc.a is in constant flux. And yes, if you have C++ library compiled with gcc 2.8.1 you can not use it with gcc 2.95.2 (even if this library does not use libstdc++ library and it's very rare C++ library then :-) Only two days ago I helped guy to compile some program based on C++ library compiled in RedHat 5.2 under RedHat 6.1. He ended with installation of egcs 1.0.3 from RedHat 5.2 ...
GPC does not use the C++ part of libgcc.a, so we can exclude this for now.
The question is, is it possible (without subtle bugs) to link files compiled with, say GPC based on gcc-2.8.1 and files compiled with gcc-2.95 (in which case the libgcc.a used would be wrong for either of them)? Since GPC uses the same backend as GCC, this is equivalent to the question whether you can link C files compiled with gcc-2.8.1 and gcc-2.95, which is the situation if you install gcc-2.95 on your system while your libraries have been compiled with gcc-2.8.1. Since I didn't read in the GCC docs that I should recompile all my libs after installing a new GCC version, I still can't believe that there's a problem (as far as C and Pascal are concerned)...
P.S. Do you think much about possible usage of libgpc.a with different version of gpc while developing gpc/libgpc ?
No.
Why do you think gcc development is different ?
Because GCC is a stable product and many libraries compiled with it are distributed, while GPC is alpha/beta...
Frank