This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: why would two copies of gcc-2.95.2 yield different output?
- From: "Rupert Wood" <me at rupey dot net>
- To: "'David T-G'" <davidtg at justpickone dot org>
- Cc: <gcc-help at gcc dot gnu dot org>,<gcc at gcc dot gnu dot org>,"'Fergus Henderson'" <fjh at cs dot mu dot OZ dot AU>
- Date: Thu, 13 Jun 2002 11:15:52 +0100
- Subject: RE: why would two copies of gcc-2.95.2 yield different output?
Fergus Henderson wrote:
> > Is there perhaps a way for a mere mortal to reverse-engineer the
> > binaries and see what the differences are?
>
> Use objdump (from the GNU binutils package).
It may be easier to use the two compilers to generate assembly output
for a few simple examples and diff those instead; if the assembly code
is all the same, then the difference is in the assemble or link steps or
there's a difference in libraries used. You may also get some clues by
diffing the specs files (found under
<prefix>/lib/gcc-lib/<machine>/2.95.2/specs) of the two compilers.
In any case, does it matter that the new compiler generates different
binaries? It depends how seriously you take your binary validation: even
if you rebuild the source to a tested binary with a one-line fix, it
could be argued you should re-run all your tests on the new binary. In
that case, you can just ship the binary you've got, bin the old compiler
and start using the new compiler for all future releases. (Or even jump
to a newer GCC version - if you want to stick with 2.95.x then there's
always 2.95.3, CVS gcc-2_95-branch or vendor, e.g. Debian, patches of
the CVS; or prehaps you could try GCC 3.1+.) In the worst case, you just
have to keep the old build environment until your tested binaries reach
end-of-supported-life: there's no reason you can't start using a new one
for new builds.
Rup.