This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
- From: Alan Modra <amodra at gmail dot com>
- To: Ian Lance Taylor <iant at golang dot org>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, David Edelsohn <dje dot gcc at gmail dot com>, "Lynn A. Boger" <laboger at linux dot vnet dot ibm dot com>, Matthias Klose <doko at ubuntu dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 12 Oct 2015 09:49:00 +1030
- Subject: Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
- Authentication-results: sourceware.org; auth=none
- References: <56101F0E dot 8000003 at ubuntu dot com> <56153C00 dot 2000209 at linux dot vnet dot ibm dot com> <561556F9 dot 8030802 at ubuntu dot com> <5616BC63 dot 3060307 at linux dot vnet dot ibm dot com> <5616D609 dot 2000400 at ubuntu dot com> <56181AD9 dot 6080501 at linux dot vnet dot ibm dot com> <87vbae2z71 dot fsf at igel dot home> <20151011130719 dot GF4434 at bubble dot grove dot modra dot org> <87zizpcvph dot fsf at igel dot home> <CAKOQZ8wgQ4uvoQLf6JVpBzGZHAeQCDLxMWE=M-hpW3GSDu2pww at mail dot gmail dot com>
On Sun, Oct 11, 2015 at 11:29:36AM -0700, Ian Lance Taylor wrote:
> On Sun, Oct 11, 2015 at 7:43 AM, Andreas Schwab <schwab@linux-m68k.org> wrote
> >
> > Please remind me why this logic isn't implemented as a target hook.
> >
> > supports_split_stack = TARGET_CAN_SPLIT_STACK;
> >
> > /* rs6000.h */
> > #define TARGET_CAN_SPLIT_STACK TARGET_64BIT
>
> There is a target hook for split stack support in
> gcc/common/common-target.def. The PPC version of it is in
> gcc/common/config/rs6000/rs6000-common.c.
>
> But the issue here is that we need access from the gccgo driver
> program. Can the driver program call the common target hooks?
Not the way the gccgo driver is currently written. In
lang_specific_driver you get to see global_options as set up by
init_options_struct. TARGET_64BIT, used by the hook, is at its
default value rather than what you'd see after command line option
processing. This isn't at all surprising when you consider that
lang_specific_driver must run before option processing since one of
its jobs is to insert command line options.
--
Alan Modra
Australia Development Lab, IBM