"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
22-Dec-99 04:13 you wrote:
"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.
Hmm.
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.
Perhaps.
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)?
Ask in gcc mailing list :-) Usually it works -- this is all what I can say. In fact "C" backend does not need extensive support by libgcc.a (only few functions like 64bit division are used from there). But I'm not know how important such ability is for developers of gcc ...
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)...
There WAS such problems with oldier versions of GCC (2.5 => 2.7 or something). Now gcc backend looks stable enough to avoid it but who knows ? Ask in gcc mailing list if want to be 100% sure (not about gpc but about different versions of gcc and "C" backend of course :-)
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...
glibc (for example) is also stable product and many libraries compiled with it are distributed and still you can get mess while mixing libraries compiled against glibc 2.0.x/glibc 2.1.x (EVEN if developers of glibc tried VERY hard to make glibc 2.1 backward compatible with glibc 2.0 on binary level!). It works now with gcc since development of "C" backend was not very active for last years.