public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
@ 2014-07-15 22:48 Peter Bergner
  2014-07-16  9:22 ` David Edelsohn
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Bergner @ 2014-07-15 22:48 UTC (permalink / raw)
  To: GCC Patches; +Cc: David Edelsohn, Jakub Jelinek

With a recent libsanitizer merge from upstream, we're now seeing a lot
of ASAN test suite failures with the following error:

  ==26426==ASan runtime does not come first in initial library list; you should
  either link runtime to your application or manually preload it with LD_PRELOAD.

This is caused by powerpc*-linux not defining LIBASAN_EARLY_SPEC which is
defined in gnu-user.h.  It looks like all *-linux architectures include
gnu-user.h except for powerpc*-linux.  The following patch makes powerpc*-linux
match the other linux architectures... and fixes a compiler error when we
try to redefine CC1_SPEC.

This passed bootstrap and regtesting on powerpc64-linux with no regressions.
Ok for mainline?

Peter

	* config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.
	* config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 212572)
+++ gcc/config.gcc	(working copy)
@@ -2243,7 +2243,7 @@ powerpc-*-rtems*)
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
 	;;
 powerpc*-*-linux*)
-	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
+	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
 	extra_objs="$extra_objs rs6000-linux.o"
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 212572)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -539,6 +539,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
 #endif
 
 /* Pass -G xxx to the compiler.  */
+#undef CC1_SPEC
 #define	CC1_SPEC "%{G*} %(cc1_cpu)" \
 "%{meabi: %{!mcall-*: -mcall-sysv }} \
 %{!meabi: %{!mno-eabi: \


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-15 22:48 [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures Peter Bergner
@ 2014-07-16  9:22 ` David Edelsohn
  2014-07-16  9:32   ` Jakub Jelinek
  0 siblings, 1 reply; 9+ messages in thread
From: David Edelsohn @ 2014-07-16  9:22 UTC (permalink / raw)
  To: Peter Bergner; +Cc: GCC Patches, Jakub Jelinek

On Tue, Jul 15, 2014 at 6:43 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> With a recent libsanitizer merge from upstream, we're now seeing a lot
> of ASAN test suite failures with the following error:
>
>   ==26426==ASan runtime does not come first in initial library list; you should
>   either link runtime to your application or manually preload it with LD_PRELOAD.
>
> This is caused by powerpc*-linux not defining LIBASAN_EARLY_SPEC which is
> defined in gnu-user.h.  It looks like all *-linux architectures include
> gnu-user.h except for powerpc*-linux.  The following patch makes powerpc*-linux
> match the other linux architectures... and fixes a compiler error when we
> try to redefine CC1_SPEC.
>
> This passed bootstrap and regtesting on powerpc64-linux with no regressions.
> Ok for mainline?
>
> Peter
>
>         * config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.
>         * config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it.

Typo in ChangeLog (CC!)?

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.

Thanks, David

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-16  9:22 ` David Edelsohn
@ 2014-07-16  9:32   ` Jakub Jelinek
  2014-07-16 14:01     ` Peter Bergner
  2014-07-23 20:10     ` Peter Bergner
  0 siblings, 2 replies; 9+ messages in thread
From: Jakub Jelinek @ 2014-07-16  9:32 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Peter Bergner, GCC Patches

On Wed, Jul 16, 2014 at 05:18:06AM -0400, David Edelsohn wrote:
> > This passed bootstrap and regtesting on powerpc64-linux with no regressions.
> > Ok for mainline?
> >
> > Peter
> >
> >         * config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.
> >         * config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it.
> 
> Typo in ChangeLog (CC!)?
> 
> 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.

All other Linux targets where asan is supported got the right definitions
from gnu-user.h, it was needed even on the older release branches.

As including gnu-user.h there might be too risky for the release branches,
perhaps it would be better to copy the LIB[AT]SAN* macros from gnu-user.h
to say rs6000/linux.h or rs6000/linux64.h on the release branches (and in 4.8 also
STATIC_LIB[AT]SAN_LIBS).

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-16  9:32   ` Jakub Jelinek
@ 2014-07-16 14:01     ` Peter Bergner
  2014-07-28 17:31       ` Joseph S. Myers
  2014-07-23 20:10     ` Peter Bergner
  1 sibling, 1 reply; 9+ messages in thread
From: Peter Bergner @ 2014-07-16 14:01 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: David Edelsohn, GCC Patches

On Wed, 2014-07-16 at 11:23 +0200, Jakub Jelinek wrote:
> On Wed, Jul 16, 2014 at 05:18:06AM -0400, David Edelsohn wrote:
> > > This passed bootstrap and regtesting on powerpc64-linux with no regressions.
> > > Ok for mainline?
> > >
> > > Peter
> > >
> > >         * config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.
> > >         * config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it.
> > 
> > Typo in ChangeLog (CC!)?

Woops, good catch.  I'll fix that.


> > 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?


> All other Linux targets where asan is supported got the right definitions
> from gnu-user.h, it was needed even on the older release branches.
> 
> As including gnu-user.h there might be too risky for the release branches,
> perhaps it would be better to copy the LIB[AT]SAN* macros from gnu-user.h
> to say rs6000/linux.h or rs6000/linux64.h on the release branches (and in 4.8 also
> STATIC_LIB[AT]SAN_LIBS).

That's fine with me.  I'll make that change and bootstrap/regtest it.

Peter


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-16  9:32   ` Jakub Jelinek
  2014-07-16 14:01     ` Peter Bergner
@ 2014-07-23 20:10     ` Peter Bergner
  2014-07-25 19:46       ` Peter Bergner
  1 sibling, 1 reply; 9+ messages in thread
From: Peter Bergner @ 2014-07-23 20:10 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: David Edelsohn, GCC Patches

On Wed, 2014-07-16 at 11:23 +0200, Jakub Jelinek wrote: 
> On Wed, Jul 16, 2014 at 05:18:06AM -0400, David Edelsohn 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.
> 
> All other Linux targets where asan is supported got the right definitions
> from gnu-user.h, it was needed even on the older release branches.

Ok, I compiled a source file that #includes tm.h and looked at the -dD -E
output to see what macros get defined with and without this change.
There are a few macros the gnu-user.h defines that are identical to what
some of the rs6000/sysv4.h or rs6000/linux{,64}.h header files define, so
we could remove those.  There are some that are different too, so we'd
need to keep those.  The following are the macros that are identical:

... in rs6000/sysv4.h are:

    LINK_EH_SPEC
    NO_IMPLICIT_EXTERN_C

However, there are some non-linux (eg, freebsd, lynx, etc.) that also
include rs6000/sysv4.h and not gnu-user.h, so I think we need to keep
this defines in rs6000/sysv4.h...or I could move them to freebsd{,64}.h,
lynx.h, etc.  Your preference is???

...in rs6000/linux{,64}.h are:

    ASM_APP_ON
    ASM_APP_OFF
    CPLUSPLUS_CPP_SPEC
    LINK_GCC_C_SEQUENCE_SPEC
    USE_LD_AS_NEEDED
    TARGET_POSIX_IO

These we should be able to freely remove from rs6000/linux{,64}.h since
gnu-user.h provides the same identical definitions.

There are also a few macros that gnu-user.h defines that are different than
the what rs6000/*.h files define (eg, STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC
LIB_SPEC and TARGET_LIBC_HAS_FUNCTION), so we'll want to leave those macro
definitions as well.

Peter


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-23 20:10     ` Peter Bergner
@ 2014-07-25 19:46       ` Peter Bergner
  2014-07-26 10:30         ` David Edelsohn
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Bergner @ 2014-07-25 19:46 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jakub Jelinek, GCC Patches

On Wed, 2014-07-23 at 15:06 -0500, Peter Bergner wrote:
> On Wed, 2014-07-16 at 11:23 +0200, Jakub Jelinek wrote: 
> > On Wed, Jul 16, 2014 at 05:18:06AM -0400, David Edelsohn 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.
> > 
> > All other Linux targets where asan is supported got the right definitions
> > from gnu-user.h, it was needed even on the older release branches.
> 
> Ok, I compiled a source file that #includes tm.h and looked at the -dD -E
> output to see what macros get defined with and without this change.
> There are a few macros the gnu-user.h defines that are identical to what
> some of the rs6000/sysv4.h or rs6000/linux{,64}.h header files define, so
> we could remove those.  There are some that are different too, so we'd
> need to keep those.  The following are the macros that are identical:

FYI, here is the mainline patch that removes the redundant macro defines
in rs6000/linux.h and rs6000/linux64.h.  This also passed bootstrap and
regtesting with no regressions.


Peter


	* config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.
	* config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it.
	* config/rs6000/linux.h (CPLUSPLUS_CPP_SPEC): Delete define.
	(LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	(USE_LD_AS_NEEDED): Likewise.
	(ASM_APP_ON): Likewise.
	(ASM_APP_OFF): Likewise.
	(TARGET_POSIX_IO): Likewise.
	* config/rs6000/linux64.h (CPLUSPLUS_CPP_SPEC): Likewise.
	(LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	(USE_LD_AS_NEEDED): Likewise.
	(ASM_APP_ON): Likewise.
	(ASM_APP_OFF): Likewise.
	(TARGET_POSIX_IO): Likewise.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 212572)
+++ gcc/config.gcc	(working copy)
@@ -2243,7 +2243,7 @@ powerpc-*-rtems*)
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
 	;;
 powerpc*-*-linux*)
-	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
+	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
 	extra_objs="$extra_objs rs6000-linux.o"
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 212572)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -539,6 +539,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
 #endif
 
 /* Pass -G xxx to the compiler.  */
+#undef CC1_SPEC
 #define	CC1_SPEC "%{G*} %(cc1_cpu)" \
 "%{meabi: %{!mcall-*: -mcall-sysv }} \
 %{!meabi: %{!mno-eabi: \
Index: gcc/config/rs6000/linux.h
===================================================================
--- gcc/config/rs6000/linux.h	(revision 212572)
+++ gcc/config/rs6000/linux.h	(working copy)
@@ -56,12 +56,6 @@
 #undef	CPP_OS_DEFAULT_SPEC
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
 
-/* The GNU C++ standard library currently requires _GNU_SOURCE being
-   defined on glibc-based systems. This temporary hack accomplishes this,
-   it should go away as soon as libstdc++-v3 has a real fix.  */
-#undef  CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
 #undef  LINK_SHLIB_SPEC
 #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
 
@@ -98,22 +92,6 @@
   %{rdynamic:-export-dynamic} \
   -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
 
-#define LINK_GCC_C_SEQUENCE_SPEC \
-  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-
-/* Use --as-needed -lgcc_s for eh support.  */
-#ifdef HAVE_LD_AS_NEEDED
-#define USE_LD_AS_NEEDED 1
-#endif
-
-/* Override rs6000.h definition.  */
-#undef  ASM_APP_ON
-#define ASM_APP_ON "#APP\n"
-
-/* Override rs6000.h definition.  */
-#undef  ASM_APP_OFF
-#define ASM_APP_OFF "#NO_APP\n"
-
 /* For backward compatibility, we must continue to use the AIX
    structure return convention.  */
 #undef  DRAFT_V4_STRUCT_RET
@@ -129,8 +107,6 @@
 #define RELOCATABLE_NEEDS_FIXUP \
   (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE)
 
-#define TARGET_POSIX_IO
-
 #ifdef TARGET_LIBC_PROVIDES_SSP
 /* ppc32 glibc provides __stack_chk_guard in -0x7008(2).  */
 #define TARGET_THREAD_SSP_OFFSET	-0x7008
Index: gcc/config/rs6000/linux64.h
===================================================================
--- gcc/config/rs6000/linux64.h	(revision 212572)
+++ gcc/config/rs6000/linux64.h	(working copy)
@@ -343,12 +343,6 @@ extern int dot_symbols;
 #undef  CPP_OS_DEFAULT_SPEC
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
 
-/* The GNU C++ standard library currently requires _GNU_SOURCE being
-   defined on glibc-based systems. This temporary hack accomplishes this,
-   it should go away as soon as libstdc++-v3 has a real fix.  */
-#undef  CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
 #undef  LINK_SHLIB_SPEC
 #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
 
@@ -440,14 +434,6 @@ extern int dot_symbols;
 #undef  WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 32
 
-/* Override rs6000.h definition.  */
-#undef  ASM_APP_ON
-#define ASM_APP_ON "#APP\n"
-
-/* Override rs6000.h definition.  */
-#undef  ASM_APP_OFF
-#define ASM_APP_OFF "#NO_APP\n"
-
 #undef  RS6000_MCOUNT
 #define RS6000_MCOUNT "_mcount"
 
@@ -547,16 +533,6 @@ extern int dot_symbols;
 #undef DRAFT_V4_STRUCT_RET
 #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
 
-#define TARGET_POSIX_IO
-
-#define LINK_GCC_C_SEQUENCE_SPEC \
-  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-
-/* Use --as-needed -lgcc_s for eh support.  */
-#ifdef HAVE_LD_AS_NEEDED
-#define USE_LD_AS_NEEDED 1
-#endif
-
 #ifdef TARGET_LIBC_PROVIDES_SSP
 /* ppc32 glibc provides __stack_chk_guard in -0x7008(2),
    ppc64 glibc provides it at -0x7010(13).  */


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-25 19:46       ` Peter Bergner
@ 2014-07-26 10:30         ` David Edelsohn
  2014-07-28 14:03           ` Peter Bergner
  0 siblings, 1 reply; 9+ messages in thread
From: David Edelsohn @ 2014-07-26 10:30 UTC (permalink / raw)
  To: Peter Bergner; +Cc: Jakub Jelinek, GCC Patches

On Fri, Jul 25, 2014 at 3:26 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> On Wed, 2014-07-23 at 15:06 -0500, Peter Bergner wrote:
>> On Wed, 2014-07-16 at 11:23 +0200, Jakub Jelinek wrote:
>> > On Wed, Jul 16, 2014 at 05:18:06AM -0400, David Edelsohn 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.
>> >
>> > All other Linux targets where asan is supported got the right definitions
>> > from gnu-user.h, it was needed even on the older release branches.
>>
>> Ok, I compiled a source file that #includes tm.h and looked at the -dD -E
>> output to see what macros get defined with and without this change.
>> There are a few macros the gnu-user.h defines that are identical to what
>> some of the rs6000/sysv4.h or rs6000/linux{,64}.h header files define, so
>> we could remove those.  There are some that are different too, so we'd
>> need to keep those.  The following are the macros that are identical:
>
> FYI, here is the mainline patch that removes the redundant macro defines
> in rs6000/linux.h and rs6000/linux64.h.  This also passed bootstrap and
> regtesting with no regressions.
>
>
> Peter
>
>
>         * config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.
>         * config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it.
>         * config/rs6000/linux.h (CPLUSPLUS_CPP_SPEC): Delete define.
>         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
>         (USE_LD_AS_NEEDED): Likewise.
>         (ASM_APP_ON): Likewise.
>         (ASM_APP_OFF): Likewise.
>         (TARGET_POSIX_IO): Likewise.
>         * config/rs6000/linux64.h (CPLUSPLUS_CPP_SPEC): Likewise.
>         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
>         (USE_LD_AS_NEEDED): Likewise.
>         (ASM_APP_ON): Likewise.
>         (ASM_APP_OFF): Likewise.
>         (TARGET_POSIX_IO): Likewise.

Okay.

Thanks, David

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-26 10:30         ` David Edelsohn
@ 2014-07-28 14:03           ` Peter Bergner
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Bergner @ 2014-07-28 14:03 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jakub Jelinek, GCC Patches

On Sat, 2014-07-26 at 06:24 -0400, David Edelsohn wrote:
> On Fri, Jul 25, 2014 at 3:26 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> >         * config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.
> >         * config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it.
> >         * config/rs6000/linux.h (CPLUSPLUS_CPP_SPEC): Delete define.
> >         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
> >         (USE_LD_AS_NEEDED): Likewise.
> >         (ASM_APP_ON): Likewise.
> >         (ASM_APP_OFF): Likewise.
> >         (TARGET_POSIX_IO): Likewise.
> >         * config/rs6000/linux64.h (CPLUSPLUS_CPP_SPEC): Likewise.
> >         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
> >         (USE_LD_AS_NEEDED): Likewise.
> >         (ASM_APP_ON): Likewise.
> >         (ASM_APP_OFF): Likewise.
> >         (TARGET_POSIX_IO): Likewise.
> 
> Okay.

Committed as revision 213125.  Thanks.

Peter


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures
  2014-07-16 14:01     ` Peter Bergner
@ 2014-07-28 17:31       ` Joseph S. Myers
  0 siblings, 0 replies; 9+ messages in thread
From: Joseph S. Myers @ 2014-07-28 17:31 UTC (permalink / raw)
  To: Peter Bergner; +Cc: Jakub Jelinek, David Edelsohn, GCC Patches

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-07-28 17:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 22:48 [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures Peter Bergner
2014-07-16  9:22 ` David Edelsohn
2014-07-16  9:32   ` Jakub Jelinek
2014-07-16 14:01     ` Peter Bergner
2014-07-28 17:31       ` Joseph S. Myers
2014-07-23 20:10     ` Peter Bergner
2014-07-25 19:46       ` Peter Bergner
2014-07-26 10:30         ` David Edelsohn
2014-07-28 14:03           ` Peter Bergner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).