On 10 Nov 2001, at 5:55, Frank Heckenbach wrote:
As far as I know, it's not guaranteed that there are no such dependencies. E.g., things in libgcc.a might change.
I confess that I know rather little about GCC internals, but any given gcc- compiled object file might depend on routines contained in the libgcc.a file that comes with GCC (i.e., when compiling, GCC may implicitly emit calls to routines in libgcc.a to support certain source constructs), correct? If so, then it seems to me that *every* object file that will be linked in a given executable might possibly be dependent on the particular version of GCC that was used to compile it (because it will be dependent on a particular version of libgcc.a -- the version associated with the compiler used to produce the object file).
The only guaranteed configuration, then, would be to ensure that everything -- every compiled source file, every third-party library routine, every run- time library component -- that will be linked together had been compiled with the identical version of GCC (so that they would all be dependent on the same version of libgcc.a).
I accept what you say, but how is that ever accomplished in practice?
But then, I've done a joint Pascal/C++ project some years ago, using a GPC based on 2.8.1 and a g++ version of egcs-2.91.whatever, and a GMP library compiled by whatever C compiler (maybe not even gcc, but the system compiler), and all that on Solaris, and it worked ...
Or is it? ;-)
-- Dave