Mail Archives: djgpp-workers/2003/04/28/02:58:54
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 -