[PATCH] PR66870 PowerPC64 Enable gold linker with split stack
Tue Sep 15 18:21:00 GMT 2015
On Thu, Aug 27, 2015 at 5:00 PM, Lynn A. Boger
> Here is an updated patch, with a summary of the differences from my previous
> - In my previous patch gcc configure was verifying the gold linker even if
> it was the
> default linker, but that is not necessary since in that case -fuse-ld=gold
> does not
> need to be set. Gold version checking is now only done if the alternate
> linker is gold
> and the default linker is not.
> - The STACK_SPLIT_STACK spec define found in gcc/gcc.c now adds
> if the gcc configure determines the alternate gold linker has split stack
> - A case statement is now used in gcc configure to verify the gold version,
> to make it
> easier for other platforms to add their checks if necessary. I don't know
> if other
> platforms require this checking; Matthias' patch did not check the version.
> For powerpc64
> big and little endian we have to check the gold linker version because the
> stack support was added recently and older gold linkers won't work.
> - The version checking of the gold linker was removed from the libgo
> since gcc configure has already decided if it is correct.
> - TARGET_CAN_SPLIT_STACK_64BIT is now defined in sysv4.h if the glibc
> is correct for split stack for powerpc64 big and little endian. This define
> is used in
> go/gospec.c in the same way that TARGET_CAN_SPLIT_STACK is used now but,
> additionally verifies that it is a 64 bit compile. This is necessary
> because split
> stack support is not available for ppc 32 bit big endian in gcc or the gold
> Bootstrapped and tested on x86_64, ppc64le, ppc64 (ran m32, m64 tests)
> 2015-08-27 Lynn Boger <firstname.lastname@example.org>
> PR target/66870
> config/rs6000/sysv4.h: Define TARGET_CAN_SPLIT_STACK_64BIT
> based on LIBC version.
> config.in: Set up HAVE_GOLD_ALTERNATE.
> configure.ac: Define HAVE_GOLD_ALTERNATE if the version of the
> linker supports split stack.
> configure: Regenerate.
> gcc.c: Add -fuse-ld=gold to STACK_SPLIT_SPEC if
> is defined.
> go/gospec.c: (lang_specific_driver): Use
> to control setting of fsplit-stack and u,pthread_create options for
> 64 bit
I don't have authority to approve for most of the patch.
I noticed that the test for Gold version number is different than a
similar test in another part of configure. And the sed pattern seems
to be too restrictive -- it fails to extract a version number for my
tests with Gold in a few different Linux distros. This should be
addressed instead of silently misidentifying split stack support in
More information about the Gcc-patches