J. David Bryan wrote:
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?
Yes.
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).
Yes (and I thought this was the original question in this sub-thread).
I accept what you say, but how is that ever accomplished in practice?
By recompiling everything, to be sure (see the quote from the DJGPP announcement).
I don't think "normal" people will upgrade their compiler version that often (as for GPC, it means the backend version, not the GPC frontend version), and for, say, a Linux distribution, I do expect them to recompile everything when they start using a new GCC version.
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? ;-)
As long as it's for our own use, we can inverstigate any problems arising from it. If we had shipped the result to an important customer, we might have done things a little differently ... ;-)
Frank