delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/08/24/03:59:24

Date: Mon, 24 Aug 1998 10:06:54 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp-workers AT delorie DOT com, Robert Hoehne <robert DOT hoehne AT gmx DOT net>,
Andrew Crabtree <andrewc AT rosemail DOT rose DOT hp DOT com>
Subject: Re: GCC incompatibilities
In-Reply-To: <Pine.SUN.3.91.980823182929.1451D-100000@is>
Message-ID: <Pine.A32.3.91.980824095249.56248A-100000@ieva01.lanet.lv>
MIME-Version: 1.0


On Sun, 23 Aug 1998, Eli Zaretskii wrote:

> I have several old messages by Robert and Andrew which imply that there 
> could be compatibility problems between object files produced by 
> different versions of GCC.
> 
> In particular, Robert once wrote that if you want to link code compiled 
> by GCC 2.8.1 with object files compiled by GCC 2.7.x, you need to invoke
> 2.8.1 with -fno-exceptions -fno-rtti (obviously, for C++ only). 
> 
> Andrew warned about incompatibilities between PGCC and GCC.  If I 
> understand correctly, stock libc cannot be used with PGCC.
> 
> Are all these still valid with the current binaries?  If so, should the 
> next FAQ release say something about these cases?  I'm particularly 
> interested to know how would these incompatibilities manifest 
> themselves.
> 

I cannot say about PGCC as I didn't actually tried it seriously but
it is so with C++ with latest development snapshots of EGCS. I have tried 
egcs-2.91.53 19980803 and egcs-2.91.54 19980816 for both Linux and
DJGPP. It required some hacking to get egcs compiled for DJGPP.

The problem is that exception support is changed against one from
gcc-2.8.1. If I linking object file generated from C++ source by 
gcc-2.8.1 or egcs-1.0.3 with latest development snapshots of egcs
(more accuratelly libgcc.a from these versions) I'm getting message
about unresolved __eh_pc as such symbol is no more in libgcc.a

I didn't have any problem with libc.a for both Linux and DJGPP.
So perhaps there will be no problems with C sources (only question:
which version of gcc were used by DJ to compile djdev202 980726).
But unfortunatelly one should recompile C++ sources when changing gcc 
versions. I have met incompatibilities even between gcc-2.8.0 and gcc-2.8.1
(not exceptions related)

Perhaps PGCC can change things even with C if alignment of local variables
in stack is changed.

Andris

- Raw text -


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