This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, David Edelsohn <dje dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Jul 2014 17:27:51 +0000
- Subject: Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
- Authentication-results: sourceware.org; auth=none
- References: <1405464182 dot 4285 dot 24 dot camel at otta> <CAGWvnykbyQ+ghA5_BtDUjUYbCLdOyYhr4w=djJnhAwOSz5HkmQ at mail dot gmail dot com> <20140716092358 dot GB31640 at tucnak dot redhat dot com> <1405519085 dot 4285 dot 31 dot camel at otta>
On Wed, 16 Jul 2014, Peter Bergner wrote:
> > > This seems weird. Why wasn't this file included before or whenever it
> > > was added for other *-linux targets? This seems to define SPECs that
> > > should have been necessary before now.
>
> This was comitted by Joseph with revision 168711 and submitted here:
>
> https://gcc.gnu.org/ml/gcc-patches/2010-12/msg02055.html
>
> The patch seems to move some defines from linux.h to gnu-user.h and
> it looks like powerpc*-linux doesn't include linux.h either.
> Is that another header file we're supposed to include? ...or do
> our rs6000/linux{,64}.h header files completely obviate the need
> for that?
I believe the historical reason for not including the
architecture-independent headers was the -mcall-* handling in
rs6000/sysv4.h to allow a compiler for one target to build / link as if
for another target for that architecture. That arrangement means all the
main specs are defined via per-OS named specs, with rs6000/sysv4.h
containing the definitions of the underlying specs for each OS. When
specs come from the architecture-independent linux.h or gnu-user.h, other
OS compilers with -mcall-linux will not get those specs and so will not
properly link in the way a compiler configured for GNU/Linux target will.
Enough configuration is in fact done in the OS-specific headers that I
don't think the -mcall-* handling of specs is useful any more (or has been
for a long time). (The compile-time handling of -mcall-* to select a
particular ABI in SUBTARGET_OVERRIDE_OPTIONS may be more useful and seems
unproblematic.)
So as I said in the message you refer to (and elsewhere), I think it would
be a useful cleanup (and would not remove any feature that is actually
usable) to remove the -mcall-* specs handling and make powerpc* targets
more like other architectures in this regard - each OS's headers define
the specs for that OS without the added indirection.
(I'm doubtful of the current use of -mads -myellowknife -mmvme as well -
other architectures avoid having such special compiler options for each
BSP.)
--
Joseph S. Myers
joseph@codesourcery.com