diff mbox

[0/4] PowerPC64 Linux split stack support

Message ID 20150615090333.GF1723@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra June 15, 2015, 9:03 a.m. UTC
On Sat, Jun 13, 2015 at 12:46:18PM +0200, Andreas Schwab wrote:
> /usr/bin/mkdir -p .; files=`echo ../../../../libgo/go/errors/errors.go | sed -e 's/[^ ]*\.gox//g'`; /bin/sh ./libtool --tag GO --mode=compile /daten/gcc/gcc-20150613/Build/./gcc/gccgo -B/daten/gcc/gcc-20150613/Build/./gcc/ -B/usr/powerpc64-linux/bin/ -B/usr/powerpc64-linux/lib/ -isystem /usr/powerpc64-linux/include -isystem /usr/powerpc64-linux/sys-include  -m32   -O2 -g -I . -c -fgo-pkgpath=`echo errors.lo | sed -e 's/.lo$//' -e 's/-go$//'` -o errors.lo $files
> libtool: compile:  /daten/gcc/gcc-20150613/Build/./gcc/gccgo -B/daten/gcc/gcc-20150613/Build/./gcc/ -B/usr/powerpc64-linux/bin/ -B/usr/powerpc64-linux/lib/ -isystem /usr/powerpc64-linux/include -isystem /usr/powerpc64-linux/sys-include -m32 -O2 -g -I . -c -fgo-pkgpath=errors ../../../../libgo/go/errors/errors.go 
> go1: error: ‘-fsplit-stack’ currently only supported on PowerPC64 GNU/Linux with glibc-2.18 or later
> go1: error: ‘-fsplit-stack’ is not supported by this compiler configuration
> make[2]: *** [errors.lo] Error 1
> make[2]: Leaving directory `/daten/gcc/gcc-20150613/Build/powerpc64-linux/32/libgo'
> make[1]: *** [all-recursive] Error 1

This untested patch ought to fix the problem, I think.  My BE test
environment had gold installed but not a sufficietly recent glibc.
The LE test environment of course didn't build any 32-bit multilibs.
Oops.

	* configure.ac (libgo_cv_c_split_stack_supported): Unset for powerpc.
	* configure: Regenerate.

Comments

Andreas Schwab June 15, 2015, 9:44 a.m. UTC | #1
Alan Modra <amodra@gmail.com> writes:

> diff --git a/libgo/configure.ac b/libgo/configure.ac
> index 7c403a5..2ddcdfd 100644
> --- a/libgo/configure.ac
> +++ b/libgo/configure.ac
> @@ -366,6 +366,13 @@ esac
>  AC_SUBST(OSCFLAGS)
>  
>  dnl Use -fsplit-stack when compiling C code if available.
> +case "$target" in
> +    powerpc*-*-*)
> +	# Don't use cached value.  Support is available only for 64-bit,
> +	# so the result from a 64-bit multilib is not valid for 32-bit.
> +	unset libgo_cv_c_split_stack_supported

Where does this cached value come from?  There shouldn't be any sharing
between multilib builds.

Andreas.
Andreas Schwab June 15, 2015, 5:12 p.m. UTC | #2
Alan Modra <amodra@gmail.com> writes:

> This untested patch ought to fix the problem, I think.

There is no -fsplit-stack in the Makefile, and the configure script
has already determined the correct settings.

$ grep -e -fsplit-stack libgo/Makefile 32/libgo/Makefile 
libgo/Makefile:SPLIT_STACK = -fsplit-stack
$ grep split_stack libgo/config.log 32/libgo/config.log 
libgo/config.log:libgo_cv_c_linker_supports_split_stack=no
libgo/config.log:libgo_cv_c_split_stack_supported=yes
32/libgo/config.log:libgo_cv_c_linker_supports_split_stack=no
32/libgo/config.log:libgo_cv_c_split_stack_supported=no

Andreas.
Andreas Schwab June 15, 2015, 5:51 p.m. UTC | #3
The bug is of course that like DEFAULT_ABI, rs6000_isa_flags hasn't been
determined yet.

Andreas.
diff mbox

Patch

diff --git a/libgo/configure.ac b/libgo/configure.ac
index 7c403a5..2ddcdfd 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -366,6 +366,13 @@  esac
 AC_SUBST(OSCFLAGS)
 
 dnl Use -fsplit-stack when compiling C code if available.
+case "$target" in
+    powerpc*-*-*)
+	# Don't use cached value.  Support is available only for 64-bit,
+	# so the result from a 64-bit multilib is not valid for 32-bit.
+	unset libgo_cv_c_split_stack_supported
+	;;
+esac
 AC_CACHE_CHECK([whether -fsplit-stack is supported],
 [libgo_cv_c_split_stack_supported],
 [CFLAGS_hold=$CFLAGS