This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/config/rs6000/rs6000.h bug?
- To: "Rask Ingemann Lambertsen" <rask at kampsax dot k-net dot dk>
- Subject: Re: gcc/config/rs6000/rs6000.h bug?
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Mon, 20 Jul 1998 16:56:21 -0400
- Cc: egcs at cygnus dot com
>>>>> "Rask Ingemann Lambertsen" writes:
Rask> A freshly checked out "gcc/config/rs6000/xm-rs6000.h" contains:
Rask> ---------
Rask> /* Arguments to use with `exit'. */
Rask> #define SUCCESS_EXIT_CODE 0
Rask> #define FATAL_EXIT_CODE 33
Rask> ---------
Rask> which should be removed since <stdlib.h> already define them (and even to
Rask> correct values).
The values in xm-rs6000.h only are used by the GCC compiler itself
-- not exported, so why does this matter? Historically GCC has wanted a
distinct failure value exit status.
Rask> ----------
Rask> /* AIX is a flavor of System V */
Rask> #define USG
Rask> ----------
Rask> and
Rask> ----------
Rask> #ifndef CROSS_COMPILE
Rask> /* The AIX linker will discard static constructors in object files before
Rask> collect has a chance to see them, so scan the object files directly. */
Rask> #define COLLECT_EXPORT_LIST
Rask> #endif
Rask> ----------
Rask> which IMHO belongs in xm-aix??.h, not in xm-rs6000.h.
xm-rs6000.h only is used for AIX. This is a historical artifact
from the "rs6000" port originally only targeted for AIX. This also is why
the port is called "rs6000" instead of something more appropriate. All of
this is hidden from the user in the GCC configuration, so, again, why does
this matter?
GCC developers do not make gratuitous changes to fix things which
really are not broken. xm-rs6000.h is the default because the port is
called "rs6000". AIX is in some sense the default target for that port.
If we change this name then we need to manually add "xm-aix.h" throughout
which could introduce errors. I don't consider changing internal APIs for
beauty to be good software engineering practice. This is not what would
be used if we were starting from scratch, but this is what we have
inherited.
David