delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/08/24/13:44:51

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199808241743.AA247760603@typhoon.rose.hp.com>
Subject: Re: GCC incompatibilities
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Mon, 24 Aug 1998 10:43:23 PDT
Cc: djgpp-workers AT delorie DOT com, robert DOT hoehne AT gmx DOT net,
andrewc AT rosemail DOT rose DOT hp DOT com
In-Reply-To: <Pine.SUN.3.91.980823182929.1451D-100000@is>; from "Eli Zaretskii" at Aug 23, 98 6:37 pm
Reply-To: andrewc AT rosemail DOT rose DOT hp DOT com

> compatibility problems between object files produced by 
> different versions of GCC.
In many cases, yes.  Most seem to be related to c++ stuff.  The
problems arise between what is expected to be in libgcc.a.  Typically,
you need to link against the version of libgcc.a specific to the 
compiler you used to create the object files.  The biggest gotchas here
have been exception handling and rtti I think.

These are usually easy to find because you will get unresolved externals
when linking.

> Andrew warned about incompatibilities between PGCC and GCC.  If I 
> understand correctly, stock libc cannot be used with PGCC.
No.  This is another (maybe another 2 issues).  The crt code for 
djgpp 2.01 doesn't align the stack.  Its not an incompatibility, but
it can slow things down a lot.  I recommend that people recompile
all of their libs with pgcc just to get the small speed increase.  It 
is not actually required ..... unless you want to use any of the -m 
options that break the abi (this also makes object files incompatible
with anything not compiled with the same options).  So, there are 
some -m options that control alignment of static data like floats and 
doubles.  There are also some that work on the stack.  If those are used,
they must be used on every singe file, including all libs and such.
If you screw this up you will get bogus results, or run time fp exceptions
or something.  Some of these options exist in regular gcc and egcs as well.


Andy

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019