delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/04/28/02:58:54

From: Andris Pavenis <pavenis AT latnet DOT lv>
To: djgpp-workers AT delorie DOT com, Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>,
Ben Peddell <killer DOT lightspeed AT bigpond DOT com>, rudd AT cyberoptics DOT com
Subject: Re: gcc 3.x breaks ABI compatibility? [Was: Re: Bug 00314 -- div() still broken]
Date: Mon, 28 Apr 2003 09:54:02 +0300
User-Agent: KMail/1.5.1
Cc: DJGPP workers <djgpp-workers AT delorie DOT com>
References: <3e9c6920$0$21928$afc38c87@> <lzLqa.23283$1s1 DOT 356122 AT newsfeeds DOT bigpond DOT com> <3EABA5AA DOT 99B8EDE3 AT phekda DOT freeserve DOT co DOT uk>
In-Reply-To: <3EABA5AA.99B8EDE3@phekda.freeserve.co.uk>
MIME-Version: 1.0
Message-Id: <200304280954.02899.pavenis@latnet.lv>
Reply-To: djgpp-workers AT delorie DOT com

On Sunday 27 April 2003 12:40, Richard Dawe wrote:
> Hello.
>
> Ben Peddell wrote:
> [snip]
>
> > OK. GCC 3.2.1 has -fpcc-struct-return by default in DJGPP, whilst GCC
> > 3.2.2 has -freg-struct-return by default in DJGPP.
> > GCC 3.2.2 may need to be configured to make -fpcc-struct-return the
> > default, to maintain compatibility with the DJGPP 2.03 libraries. Or,
> > the libraries may need to be re-compiled for GCC 3.2.2, and marked as
> > such.
> >
> > These options are in `info gcc "Invoking GCC" "Code Gen Options"'
>
> After rummaging around a bit more:
>
> It's possible that 3.2.1 was broken. There were some ABI regressions in
> 3.2.1 that were fixed in 3.2.2:
>
> http://gcc.gnu.org/gcc-3.2/changes.html#3.2.2
>
> PR/9506 is the one:
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=9506
>
> gcc defaults to using -fpcc-struct-return, but what does it actually use
> for 2.95.2 and 3.2.2?
>
> I've just looked at the gcc 2.95.2 sources and it looks like
> -fpcc-struct-return (i.e.: use memory) is the default there.
>
> The gcc 3.2.2 source seems to default to using registers. See the end
> gcc/config/i386/djgpp.h:
>
> /* Don't default to pcc-struct-return, because gcc is the only compiler,
>    and we want to retain compatibility with older gcc versions.  */
> #define DEFAULT_PCC_STRUCT_RETURN 0
>
> Why is this defined? I couldn't see a ChangeLog entry for djgpp.h. AFAICT
> this breaks backwards compatibility, i.e.: the opposite of what the comment
> says. Is there something I'm missing?

I copied it from other i386 targets. GCC-3.2.2 didn't compile without defining 
DEFAULT_PCC_STRUCT_RETURN, as there is no default

Andris

- Raw text -


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