https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66870

--- Comment #2 from boger at us dot ibm.com ---
(In reply to Ian Lance Taylor from comment #1)
> The various issues in this bug are in different parts of the code base.  The
> bug is assigned to me, but, to be clear, I have no plans to work on anything
> in the PPC-specific code.
> 

Understood.

> For x86, TARGET_CAN_SPLIT_STACK is defined in
> gcc/config/i386/gnu-user-common.h.  The intent of the code in gospec.c is to
> pass -fsplit-stack and -Wl,-u,pthread_create when linking.  When compiling,
> split stack is turned on by the code in go_langhook_init_options_struct in
> gcc/go/go-lang.c.  When linking, we want to pass -fsplit-stack so that
> gcc/gcc.c uses STACK_SPLIT_SPEC.  If the target defines
> TARGET_CAN_SPLIT_STACK for all cases where it might support it, I think the
> code will more or less work even for cases where split stack is not
> supported.  If we don't pass those options, then the split-stack code will
> not work entirely correctly because new threads won't know their stack size.

In gcc.c there is STACK_SPLIT_SPEC which sets --wrap=pthread_create in the
LINK_COMMAND_SPEC if -fsplit-stack is set.  Is there a reason there are 2
different split stack dependent link options are being set in two different
ways?

Reply via email to