public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
@ 2015-08-18 21:14 Lynn A. Boger
  2015-08-19 19:37 ` Matthias Klose
  2015-08-25 23:05 ` Ian Lance Taylor
  0 siblings, 2 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-08-18 21:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: david Edelsohn, Ian Taylor, Alan Modra

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

As discussed in PR 66870, for ppc64le and ppc64le it is preferred to
  use the gold linker with gccgo or gcc if the split stack option is 
enabled.
Use of the gold linker with the split stack option results in less storage
allocated for goroutine stacks; if split stack is used without the gold
linker then some testcase failures can occur.

   Since the use of the gold linker has not been well tested
with all gcc compilers on Power, it is only used as the linker if the
split stack option is used.

This adds the capability to the configure for gcc and libgo to determine
if the gold linker is available at build time, either in the path or 
explicitly
  configured, and its version supports split stack.  If that is the case 
then
defines are set that cause the gold linker to be used by the compiler when
-fsplit-stack is used.  This applies to ppc64 and ppc64le.  Other platforms
with split stack work as before.

2015-08-18    Lynn Boger <laboger@linux.vnet.ibm.com>

gcc/
         PR target/66870
         config/rs6000/linux64.h: When HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK
         is defined add -fuse-ld=gold if fsplit-stack and not m32
         config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK based on
         LIBC version.
         config.in:  Set up HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
         configure.ac:  When gold linker is available and its version
         supports split stack on ppc64, ppc64le, define
         HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
         configure:  Regenerate.

libgo/
         PR target/66870
         configure.ac:  When gccgo for building libgo uses the gold version
         containing split stack support on ppc64, ppc64le, define
         LINKER_SUPPORTS_SPLIT_STACK.
         configure:  Regenerate.

For platforms other than ppc64 and ppc64le, the configure for gcc
and libgo behave as before.

Bootstrapped and ran libgo and go testsuite on ppc64, ppc64le, x86_64.




[-- Attachment #2: gccgo-config-gold-pr66870.diff --]
[-- Type: text/x-patch, Size: 5288 bytes --]

Index: gcc/config/rs6000/linux64.h
===================================================================
--- gcc/config/rs6000/linux64.h	(revision 226894)
+++ gcc/config/rs6000/linux64.h	(working copy)
@@ -227,8 +227,12 @@ extern int dot_symbols;
 #endif
 
 #ifndef LINK_OS_EXTRA_SPEC64
+#ifdef HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK
+#define LINK_OS_EXTRA_SPEC64   "%{fsplit-stack: %{!m32: -fuse-ld=gold}}"
+#else
 #define LINK_OS_EXTRA_SPEC64	""
 #endif
+#endif
 
 #ifndef LINK_OS_NEW_DTAGS_SPEC
 #define LINK_OS_NEW_DTAGS_SPEC	""
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 226894)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -946,6 +946,12 @@ ncrtn.o%s"
 #undef TARGET_ASAN_SHADOW_OFFSET
 #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
 
+#undef TARGET_CAN_SPLIT_STACK
+#if TARGET_GLIBC_MAJOR > 2 \
+  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
+#define TARGET_CAN_SPLIT_STACK 1
+#endif
+
 /* This target uses the sysv4.opt file.  */
 #define TARGET_USES_SYSV4_OPT 1
 
Index: gcc/config.in
===================================================================
--- gcc/config.in	(revision 226894)
+++ gcc/config.in	(working copy)
@@ -1484,6 +1484,11 @@
 #endif
 
 
+/* Define to 1 if there is a gold linker in the path which supports split stack. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK
+#endif
+
 /* Define to 1 if you have the <limits.h> header file. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_LIMITS_H
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 226894)
+++ gcc/configure.ac	(working copy)
@@ -5174,7 +5174,41 @@ EOF
       AC_DEFINE_UNQUOTED(POWERPC64_TOC_POINTER_ALIGNMENT, $gcc_cv_ld_toc_align,
     [Define to .TOC. alignment forced by your linker.])
     fi
-    ;;
+
+# Check for split stack support within the gold linker
+    AC_CACHE_CHECK(gold linker supports split stack,
+    gcc_cv_ld_gold_supports_split_stack,
+    [gcc_cv_ld_gold_supports_split_stack=no
+    if test x"$ld_is_gold" = xyes; then
+        gold_linker=$gcc_cv_ld
+    elif "$ORIGINAL_LD_GOLD_FOR_TARGET" --version | grep gold >/dev/null 2>&1; then
+        gold_linker=$ORIGINAL_LD_GOLD_FOR_TARGET
+    else
+        gold_linker=""
+    fi
+    if test "$gold_linker" != ""; then
+        gold_vers=`$gold_linker --version | sed 1q | sed -n -e 's/.*Binutils.* \([[0-9]][[0-9]]*\.[[^)]]*\)).*$/\1/p'`
+        gold_vers_major=`expr "$gold_vers" : '\([[0-9]]*\)'`
+        gold_vers_minor=`expr "$gold_vers" : '[[0-9]]*\.\([[0-9]]*\)'`
+        gold_vers_patch=`expr "$gold_vers" : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+
+        case x"$gold_vers_minor" in
+          x25)
+            if test x"$gold_vers_patch" != ""; then
+              gcc_cv_ld_gold_supports_split_stack=yes
+            fi
+            ;;
+          x2[[6-9]])
+            gcc_cv_ld_gold_supports_split_stack=yes
+            ;;
+        esac     
+   fi
+   ])
+   if test x"$gcc_cv_ld_gold_supports_split_stack" = xyes; then
+      AC_DEFINE(HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK, 1,
+   [Define if your PowerPC64 gold linker supports split stack.])
+   fi
+   ;;
 esac
 
 case "$target" in
Index: libgo/configure.ac
===================================================================
--- libgo/configure.ac	(revision 226894)
+++ libgo/configure.ac	(working copy)
@@ -385,16 +385,35 @@ AC_SUBST(SPLIT_STACK)
 AM_CONDITIONAL(USING_SPLIT_STACK,
 	test "$libgo_cv_c_split_stack_supported" = yes)
 
-dnl Check whether the linker does stack munging when calling from
-dnl split-stack into non-split-stack code.  We check this by looking
-dnl at the --help output.  FIXME: This is only half right: it's
-dnl possible for the linker to support this for some targets but not
-dnl others.
+dnl Check whether the gold linker is the linker used by gccgo.
+dnl For ppc64 and ppc64le, check the gold linker version to
+dnl verify it contains split stack support.
 AC_CACHE_CHECK([whether linker supports split stack],
 [libgo_cv_c_linker_supports_split_stack],
 [libgo_cv_c_linker_supports_split_stack=no
-if $GOC -Wl,--help 2>/dev/null | grep split-stack-adjust-size >/dev/null 2>&1; then
-  libgo_cv_c_linker_supports_split_stack=yes
+if test "$is_ppc64" == "yes" || test "$is_ppc64le" == "yes"; then
+  if $GOC -Wl,--version | grep -i gold >/dev/null 2>&1; then
+    gold_vers=`$GOC -Wl,--version | sed 1q | sed -n -e 's/.*Binutils.* \([[0-9]][[0-9]]*\.[[^)]]*\)).*$/\1/p'`
+    gold_vers_major=`expr "$gold_vers" : '\([[0-9]]*\)'`
+    gold_vers_minor=`expr "$gold_vers" : '[[0-9]]*\.\([[0-9]]*\)'`
+    gold_vers_patch=`expr "$gold_vers" : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+
+    case x"$gold_vers_minor" in
+      x25)
+        if test x"$gold_vers_patch" != ""; then
+          libgo_cv_c_linker_supports_split_stack=yes
+        fi
+        ;;
+      x2[[6-9]])
+        libgo_cv_c_linker_supports_split_stack=yes
+        ;;
+      esac
+  fi
+
+else
+  if $GOC -Wl,--help 2>/dev/null | grep split-stack-adjust-size >/dev/null 2>&1; then
+    libgo_cv_c_linker_supports_split_stack=yes
+  fi
 fi])
 if test "$libgo_cv_c_linker_supports_split_stack" = yes; then
   AC_DEFINE(LINKER_SUPPORTS_SPLIT_STACK, 1,

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-18 21:14 [PATCH] PR66870 PowerPC64 Enable gold linker with split stack Lynn A. Boger
@ 2015-08-19 19:37 ` Matthias Klose
  2015-08-19 19:42   ` David Edelsohn
                     ` (2 more replies)
  2015-08-25 23:05 ` Ian Lance Taylor
  1 sibling, 3 replies; 36+ messages in thread
From: Matthias Klose @ 2015-08-19 19:37 UTC (permalink / raw)
  To: Lynn A. Boger, gcc-patches; +Cc: david Edelsohn, Ian Taylor, Alan Modra

[-- Attachment #1: Type: text/plain, Size: 2180 bytes --]

On 08/18/2015 10:36 PM, Lynn A. Boger wrote:
> As discussed in PR 66870, for ppc64le and ppc64le it is preferred to
>  use the gold linker with gccgo or gcc if the split stack option is enabled.
> Use of the gold linker with the split stack option results in less storage
> allocated for goroutine stacks; if split stack is used without the gold
> linker then some testcase failures can occur.
> 
>   Since the use of the gold linker has not been well tested
> with all gcc compilers on Power, it is only used as the linker if the
> split stack option is used.
> 
> This adds the capability to the configure for gcc and libgo to determine
> if the gold linker is available at build time, either in the path or explicitly
>  configured, and its version supports split stack.  If that is the case then
> defines are set that cause the gold linker to be used by the compiler when
> -fsplit-stack is used.  This applies to ppc64 and ppc64le.  Other platforms
> with split stack work as before.
> 
> 2015-08-18    Lynn Boger <laboger@linux.vnet.ibm.com>
> 
> gcc/
>         PR target/66870
>         config/rs6000/linux64.h: When HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK
>         is defined add -fuse-ld=gold if fsplit-stack and not m32
>         config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK based on
>         LIBC version.
>         config.in:  Set up HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>         configure.ac:  When gold linker is available and its version
>         supports split stack on ppc64, ppc64le, define
>         HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>         configure:  Regenerate.
> 
> libgo/
>         PR target/66870
>         configure.ac:  When gccgo for building libgo uses the gold version
>         containing split stack support on ppc64, ppc64le, define
>         LINKER_SUPPORTS_SPLIT_STACK.
>         configure:  Regenerate.
> 
> For platforms other than ppc64 and ppc64le, the configure for gcc
> and libgo behave as before.

why keep the old behaviour for other archs that have split stack support? Is it
really necessary to make this dependent on the target? I'm still using an
unreviewed/unpinged patch to enable gold for gccgo (attached).

Matthias



[-- Attachment #2: go-use-gold.diff --]
[-- Type: text/plain, Size: 3465 bytes --]

# DP: Pass -fuse-ld=gold to gccgo on targets supporting -fsplit-stack

gcc/go/                                                                                      
                                                                                             
        * gospec.c (lang_specific_driver): Pass -fuse-ld=gold on targets                     
        supporting -fsplit-stack, unless overwritten.                                        
                                                                                             
gcc/                                                                                         
        * configure.ac: New define HAVE_GOLD_NON_DEFAULT.                                    
        * config.in: Regenerate.                                                             
                                                                                             
Index: b/src/gcc/go/gospec.c
===================================================================
--- a/src/gcc/go/gospec.c
+++ b/src/gcc/go/gospec.c
@@ -117,6 +117,10 @@ lang_specific_driver (struct cl_decoded_
   /* Whether the -S option was used.  */
   bool saw_opt_S = false;
 
+  /* "-fuse-ld=" if it appears on the command line.  */
+  bool saw_use_ld ATTRIBUTE_UNUSED = false;
+  int need_gold = 0;
+
   /* The first input file with an extension of .go.  */
   const char *first_go_file = NULL;  
 
@@ -217,6 +221,11 @@ lang_specific_driver (struct cl_decoded_
 	    }
 
 	  break;
+
+	case OPT_fuse_ld_bfd:
+	case OPT_fuse_ld_gold:
+	  saw_use_ld = true;
+	  break;
 	}
     }
 
@@ -226,8 +235,14 @@ lang_specific_driver (struct cl_decoded_
   shared_libgcc = 0;
 #endif
 
+#if defined(TARGET_CAN_SPLIT_STACK) && defined(HAVE_GOLD_NON_DEFAULT)
+  if (!saw_use_ld)
+    need_gold = 1;
+#endif
+
   /* Make sure to have room for the trailing NULL argument.  */
-  num_args = argc + need_math + shared_libgcc + (library > 0) * 5 + 10;
+  num_args = argc + need_math + shared_libgcc + need_gold +
+    (library > 0) * 5 + 10;
   new_decoded_options = XNEWVEC (struct cl_decoded_option, num_args);
 
   i = 0;
@@ -244,6 +259,14 @@ lang_specific_driver (struct cl_decoded_
 		       &new_decoded_options[j]);
       j++;
     }
+#ifdef HAVE_GOLD_NON_DEFAULT
+  if (need_gold)
+    {
+      generate_option (OPT_fuse_ld_gold, NULL, 1, CL_DRIVER,
+		       &new_decoded_options[j]);
+      j++;
+    }
+#endif
 #endif
 
   /* NOTE: We start at 1 now, not 0.  */
Index: b/src/gcc/config.in
===================================================================
--- a/src/gcc/config.in
+++ b/src/gcc/config.in
@@ -1277,6 +1277,12 @@
 #endif
 
 
+/* Define if the gold linker is available as a non-default */
+#ifndef USED_FOR_TARGET
+#undef HAVE_GOLD_NON_DEFAULT
+#endif
+
+
 /* Define if you have the iconv() function. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_ICONV
Index: b/src/gcc/configure.ac
===================================================================
--- a/src/gcc/configure.ac
+++ b/src/gcc/configure.ac
@@ -2225,6 +2225,12 @@ if test x$gcc_cv_ld != x; then
 fi
 AC_MSG_RESULT($ld_is_gold)
 
+# Check to see if ld is used, and gold is available
+if test x$ld_is_gold = xno && which ${gcc_cv_ld}.gold >/dev/null 2>&1; then
+  AC_DEFINE(HAVE_GOLD_NON_DEFAULT, 1,
+  	    [Define if the gold linker is available as a non-default])
+fi
+
 ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
 AC_SUBST(ORIGINAL_LD_FOR_TARGET)
 case "$ORIGINAL_LD_FOR_TARGET" in

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-19 19:37 ` Matthias Klose
@ 2015-08-19 19:42   ` David Edelsohn
  2015-08-19 22:07   ` Lynn A. Boger
  2015-08-20  0:01   ` Lynn A. Boger
  2 siblings, 0 replies; 36+ messages in thread
From: David Edelsohn @ 2015-08-19 19:42 UTC (permalink / raw)
  To: Matthias Klose; +Cc: Lynn A. Boger, gcc-patches, Ian Taylor, Alan Modra

On Wed, Aug 19, 2015 at 3:33 PM, Matthias Klose <doko@ubuntu.com> wrote:

> why keep the old behaviour for other archs that have split stack support? Is it
> really necessary to make this dependent on the target? I'm still using an
> unreviewed/unpinged patch to enable gold for gccgo (attached).

I much prefer your patch.

Thanks, David

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-19 19:37 ` Matthias Klose
  2015-08-19 19:42   ` David Edelsohn
@ 2015-08-19 22:07   ` Lynn A. Boger
  2015-08-20  0:01   ` Lynn A. Boger
  2 siblings, 0 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-08-19 22:07 UTC (permalink / raw)
  To: Matthias Klose, gcc-patches; +Cc: david Edelsohn, Ian Taylor, Alan Modra

The split stack support only recently went into the gold
linker for Power so the configure needs to detect if the
gold linker version contains that support.  If the build tries
  to use a gold linker without that support the build
will fail on Power.  My understanding was that the gold
linker support had been there for other platforms.  That is why
the configure check is target dependent and only Power cares
about the version number.

I started out with a simpler patch like you have but after trying to 
build it
on ppc64le, ppc64, and ppc this is what I ended up with and I didn't
want to mess up other platforms so I left those as is.

On 08/19/2015 02:33 PM, Matthias Klose wrote:
> On 08/18/2015 10:36 PM, Lynn A. Boger wrote:
>> As discussed in PR 66870, for ppc64le and ppc64le it is preferred to
>>   use the gold linker with gccgo or gcc if the split stack option is enabled.
>> Use of the gold linker with the split stack option results in less storage
>> allocated for goroutine stacks; if split stack is used without the gold
>> linker then some testcase failures can occur.
>>
>>    Since the use of the gold linker has not been well tested
>> with all gcc compilers on Power, it is only used as the linker if the
>> split stack option is used.
>>
>> This adds the capability to the configure for gcc and libgo to determine
>> if the gold linker is available at build time, either in the path or explicitly
>>   configured, and its version supports split stack.  If that is the case then
>> defines are set that cause the gold linker to be used by the compiler when
>> -fsplit-stack is used.  This applies to ppc64 and ppc64le.  Other platforms
>> with split stack work as before.
>>
>> 2015-08-18    Lynn Boger <laboger@linux.vnet.ibm.com>
>>
>> gcc/
>>          PR target/66870
>>          config/rs6000/linux64.h: When HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK
>>          is defined add -fuse-ld=gold if fsplit-stack and not m32
>>          config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK based on
>>          LIBC version.
>>          config.in:  Set up HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>>          configure.ac:  When gold linker is available and its version
>>          supports split stack on ppc64, ppc64le, define
>>          HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>>          configure:  Regenerate.
>>
>> libgo/
>>          PR target/66870
>>          configure.ac:  When gccgo for building libgo uses the gold version
>>          containing split stack support on ppc64, ppc64le, define
>>          LINKER_SUPPORTS_SPLIT_STACK.
>>          configure:  Regenerate.
>>
>> For platforms other than ppc64 and ppc64le, the configure for gcc
>> and libgo behave as before.
> why keep the old behaviour for other archs that have split stack support? Is it
> really necessary to make this dependent on the target? I'm still using an
> unreviewed/unpinged patch to enable gold for gccgo (attached).
>
> Matthias
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-19 19:37 ` Matthias Klose
  2015-08-19 19:42   ` David Edelsohn
  2015-08-19 22:07   ` Lynn A. Boger
@ 2015-08-20  0:01   ` Lynn A. Boger
  2015-08-27 21:37     ` Lynn A. Boger
  2 siblings, 1 reply; 36+ messages in thread
From: Lynn A. Boger @ 2015-08-20  0:01 UTC (permalink / raw)
  To: Matthias Klose, gcc-patches; +Cc: david Edelsohn, Ian Taylor, Alan Modra

Also, I don't think it is sufficient to add the option to enable the
gold linker in gospec.c.  That will only affect links when using gccgo.
You also want to use the gold linker with gcc if -fsplit-stack is used.
That is why I had to add it to a spec in linux64.h, so that -fuse-ld=gold
  is added if fsplit-stack is set for all compilers, not just gccgo.

On 08/19/2015 02:33 PM, Matthias Klose wrote:
> On 08/18/2015 10:36 PM, Lynn A. Boger wrote:
>> As discussed in PR 66870, for ppc64le and ppc64le it is preferred to
>>   use the gold linker with gccgo or gcc if the split stack option is enabled.
>> Use of the gold linker with the split stack option results in less storage
>> allocated for goroutine stacks; if split stack is used without the gold
>> linker then some testcase failures can occur.
>>
>>    Since the use of the gold linker has not been well tested
>> with all gcc compilers on Power, it is only used as the linker if the
>> split stack option is used.
>>
>> This adds the capability to the configure for gcc and libgo to determine
>> if the gold linker is available at build time, either in the path or explicitly
>>   configured, and its version supports split stack.  If that is the case then
>> defines are set that cause the gold linker to be used by the compiler when
>> -fsplit-stack is used.  This applies to ppc64 and ppc64le.  Other platforms
>> with split stack work as before.
>>
>> 2015-08-18    Lynn Boger <laboger@linux.vnet.ibm.com>
>>
>> gcc/
>>          PR target/66870
>>          config/rs6000/linux64.h: When HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK
>>          is defined add -fuse-ld=gold if fsplit-stack and not m32
>>          config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK based on
>>          LIBC version.
>>          config.in:  Set up HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>>          configure.ac:  When gold linker is available and its version
>>          supports split stack on ppc64, ppc64le, define
>>          HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>>          configure:  Regenerate.
>>
>> libgo/
>>          PR target/66870
>>          configure.ac:  When gccgo for building libgo uses the gold version
>>          containing split stack support on ppc64, ppc64le, define
>>          LINKER_SUPPORTS_SPLIT_STACK.
>>          configure:  Regenerate.
>>
>> For platforms other than ppc64 and ppc64le, the configure for gcc
>> and libgo behave as before.
> why keep the old behaviour for other archs that have split stack support? Is it
> really necessary to make this dependent on the target? I'm still using an
> unreviewed/unpinged patch to enable gold for gccgo (attached).
>
> Matthias
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-18 21:14 [PATCH] PR66870 PowerPC64 Enable gold linker with split stack Lynn A. Boger
  2015-08-19 19:37 ` Matthias Klose
@ 2015-08-25 23:05 ` Ian Lance Taylor
  2015-08-26 14:01   ` Lynn A. Boger
  1 sibling, 1 reply; 36+ messages in thread
From: Ian Lance Taylor @ 2015-08-25 23:05 UTC (permalink / raw)
  To: Lynn A. Boger; +Cc: gcc-patches, david Edelsohn, Alan Modra

On Tue, Aug 18, 2015 at 1:36 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
>
> libgo/
>         PR target/66870
>         configure.ac:  When gccgo for building libgo uses the gold version
>         containing split stack support on ppc64, ppc64le, define
>         LINKER_SUPPORTS_SPLIT_STACK.
>         configure:  Regenerate.

Your version test for gold isn't robust: if the major version >= 3,
then presumably split stack is supported.  And since you have numbers,
I suggest not trying to use switch, but instead writing something like
    if expr "$gold_minor" == 25; then
        ...
    elif expr "$gold_minor" > 25; then
        ...
    fi

If that is fixed, I'm fine with the libgo part of this patch.

Ian

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-25 23:05 ` Ian Lance Taylor
@ 2015-08-26 14:01   ` Lynn A. Boger
  0 siblings, 0 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-08-26 14:01 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, david Edelsohn, Alan Modra

I am working on a new patch to address some of the previous concerns
and plan to post it soon after some final testing.

On 08/25/2015 05:51 PM, Ian Lance Taylor wrote:
> On Tue, Aug 18, 2015 at 1:36 PM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> libgo/
>>          PR target/66870
>>          configure.ac:  When gccgo for building libgo uses the gold version
>>          containing split stack support on ppc64, ppc64le, define
>>          LINKER_SUPPORTS_SPLIT_STACK.
>>          configure:  Regenerate.
> Your version test for gold isn't robust: if the major version >= 3,
> then presumably split stack is supported.  And since you have numbers,
> I suggest not trying to use switch, but instead writing something like
>      if expr "$gold_minor" == 25; then
>          ...
>      elif expr "$gold_minor" > 25; then
>          ...
>      fi
>
> If that is fixed, I'm fine with the libgo part of this patch.
>
> Ian
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-20  0:01   ` Lynn A. Boger
@ 2015-08-27 21:37     ` Lynn A. Boger
  2015-09-15 16:50       ` Ian Lance Taylor
  2015-09-15 18:21       ` David Edelsohn
  0 siblings, 2 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-08-27 21:37 UTC (permalink / raw)
  To: Matthias Klose, gcc-patches; +Cc: david Edelsohn, Ian Taylor, Alan Modra

[-- Attachment #1: Type: text/plain, Size: 5076 bytes --]

Here is an updated patch, with a summary of the differences from my previous
patch:

- 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 
-fuse-ld=gold
if the gcc configure determines the alternate gold linker has split 
stack support.
- 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 split
stack support was added recently and older gold linkers won't work.
- The version checking of the gold linker was removed from the libgo 
configure
  since gcc configure has already decided if it is correct.
- TARGET_CAN_SPLIT_STACK_64BIT is now defined in sysv4.h if the glibc 
version
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 linker.

Bootstrapped and tested on x86_64, ppc64le, ppc64 (ran m32, m64 tests)


2015-08-27    Lynn Boger <laboger@linux.vnet.ibm.com>

gcc/
          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 gold
          linker supports split stack.
          configure: Regenerate.
          gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if 
HAVE_GOLD_ALTERNATE
          is defined.
          go/gospec.c:  (lang_specific_driver):  Use 
TARGET_CAN_SPLIT_STACK_64BIT
          to control setting of fsplit-stack and u,pthread_create 
options for 64 bit
          compiles.


On 08/19/2015 06:05 PM, Lynn A. Boger wrote:
> Also, I don't think it is sufficient to add the option to enable the
> gold linker in gospec.c.  That will only affect links when using gccgo.
> You also want to use the gold linker with gcc if -fsplit-stack is used.
> That is why I had to add it to a spec in linux64.h, so that -fuse-ld=gold
>  is added if fsplit-stack is set for all compilers, not just gccgo.
>
> On 08/19/2015 02:33 PM, Matthias Klose wrote:
>> On 08/18/2015 10:36 PM, Lynn A. Boger wrote:
>>> As discussed in PR 66870, for ppc64le and ppc64le it is preferred to
>>>   use the gold linker with gccgo or gcc if the split stack option is 
>>> enabled.
>>> Use of the gold linker with the split stack option results in less 
>>> storage
>>> allocated for goroutine stacks; if split stack is used without the gold
>>> linker then some testcase failures can occur.
>>>
>>>    Since the use of the gold linker has not been well tested
>>> with all gcc compilers on Power, it is only used as the linker if the
>>> split stack option is used.
>>>
>>> This adds the capability to the configure for gcc and libgo to 
>>> determine
>>> if the gold linker is available at build time, either in the path or 
>>> explicitly
>>>   configured, and its version supports split stack.  If that is the 
>>> case then
>>> defines are set that cause the gold linker to be used by the 
>>> compiler when
>>> -fsplit-stack is used.  This applies to ppc64 and ppc64le. Other 
>>> platforms
>>> with split stack work as before.
>>>
>>> 2015-08-18    Lynn Boger <laboger@linux.vnet.ibm.com>
>>>
>>> gcc/
>>>          PR target/66870
>>>          config/rs6000/linux64.h: When 
>>> HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK
>>>          is defined add -fuse-ld=gold if fsplit-stack and not m32
>>>          config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK based on
>>>          LIBC version.
>>>          config.in:  Set up HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>>>          configure.ac:  When gold linker is available and its version
>>>          supports split stack on ppc64, ppc64le, define
>>>          HAVE_LD_GOLD_SUPPORTS_SPLIT_STACK.
>>>          configure:  Regenerate.
>>>
>>> libgo/
>>>          PR target/66870
>>>          configure.ac:  When gccgo for building libgo uses the gold 
>>> version
>>>          containing split stack support on ppc64, ppc64le, define
>>>          LINKER_SUPPORTS_SPLIT_STACK.
>>>          configure:  Regenerate.
>>>
>>> For platforms other than ppc64 and ppc64le, the configure for gcc
>>> and libgo behave as before.
>> why keep the old behaviour for other archs that have split stack 
>> support? Is it
>> really necessary to make this dependent on the target? I'm still 
>> using an
>> unreviewed/unpinged patch to enable gold for gccgo (attached).
>>
>> Matthias
>>
>>
>
>
>


[-- Attachment #2: gccgo-config-gold-submit3.diff --]
[-- Type: text/x-patch, Size: 5366 bytes --]

Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 227266)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -946,6 +946,14 @@ ncrtn.o%s"
 #undef TARGET_ASAN_SHADOW_OFFSET
 #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
 
+/* On ppc64 and ppc64le, split stack is only support for
+   64 bit. */
+#undef TARGET_CAN_SPLIT_STACK_64BIT
+#if TARGET_GLIBC_MAJOR > 2 \
+  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
+#define TARGET_CAN_SPLIT_STACK_64BIT
+#endif
+
 /* This target uses the sysv4.opt file.  */
 #define TARGET_USES_SYSV4_OPT 1
 
Index: gcc/config.in
===================================================================
--- gcc/config.in	(revision 227266)
+++ gcc/config.in	(working copy)
@@ -1296,6 +1296,12 @@
 #endif
 
 
+/* Define if the gold linker is available as a non-default */
+#ifndef USED_FOR_TARGET
+#undef HAVE_GOLD_NON_DEFAULT
+#endif
+
+
 /* Define if you have the iconv() function. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_ICONV
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 227266)
+++ gcc/configure.ac	(working copy)
@@ -2247,6 +2247,37 @@ if test x$gcc_cv_ld != x; then
 fi
 AC_MSG_RESULT($ld_is_gold)
 
+AC_MSG_CHECKING(gold linker available as non default)
+# Check to see if default ld is not gold, but gold is
+# available.  If gcc was configured with gold then 
+# nothing more is needed.
+# 
+if test x$ld_is_gold = xno && which ${gcc_cv_ld}.gold >/dev/null 2>&1; then
+  case $target in
+# check that the gold version contains the split stack support
+# on powerpc64 big and little endian
+    powerpc64*-*-*)
+      ld_gold=`which ${gcc_cv_ld}.gold`
+      gold_vers=`$ld_gold --version | sed 1q | sed -n -e 's/.*Binutils.* \([[0-9]][[0-9]]*\.[[^)]]*\)).*$/\1/p'`
+      case "$gold_vers" in
+        2.25.[[1-9]]*|2.2[[6-9]][[.0-9]]*|2.[[3-9]][[.0-9]]*|[[3-9]].[[.0-9]]*) gold_non_default=yes
+        ;;
+        *) gold_non_default=no
+        ;;
+      esac
+      ;;
+# Version check needed on other platforms that care about gold with split stack?
+    *)
+      gold_non_default=yes
+      ;;
+  esac
+  if test $gold_non_default = yes; then
+    AC_DEFINE(HAVE_GOLD_NON_DEFAULT, 1,
+    	    [Define if the gold linker is available as a non-default])
+  fi
+fi
+AC_MSG_RESULT($gold_non_default)
+
 ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
 AC_SUBST(ORIGINAL_LD_FOR_TARGET)
 case "$ORIGINAL_LD_FOR_TARGET" in
Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c	(revision 227266)
+++ gcc/gcc.c	(working copy)
@@ -666,7 +666,11 @@ proper position among the other output files.  */
    libgcc.  This is not yet a real spec, though it could become one;
    it is currently just stuffed into LINK_SPEC.  FIXME: This wrapping
    only works with GNU ld and gold.  */
+#ifdef HAVE_GOLD_NON_DEFAULT
+#define STACK_SPLIT_SPEC " %{fsplit-stack: -fuse-ld=gold --wrap=pthread_create}"
+#else
 #define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}"
+#endif
 
 #ifndef LIBASAN_SPEC
 #define STATIC_LIBASAN_LIBS \
Index: gcc/go/gospec.c
===================================================================
--- gcc/go/gospec.c	(revision 227266)
+++ gcc/go/gospec.c	(working copy)
@@ -117,6 +117,11 @@ lang_specific_driver (struct cl_decoded_option **i
   /* Whether the -S option was used.  */
   bool saw_opt_S = false;
 
+#ifdef TARGET_CAN_SPLIT_STACK_64BIT
+  /* Whether the -m32 option was used. */
+  bool saw_opt_m32 = false;
+#endif
+
   /* The first input file with an extension of .go.  */
   const char *first_go_file = NULL;  
 
@@ -152,6 +157,12 @@ lang_specific_driver (struct cl_decoded_option **i
 	    library = (library == 0) ? 1 : library;
 	  break;
 
+#ifdef TARGET_CAN_SPLIT_STACK_64BIT
+	case OPT_m32:
+	  saw_opt_m32 = true;
+	  break;
+#endif
+
 	case OPT_pg:
 	case OPT_p:
 	  saw_profile_flag = true;
@@ -237,8 +248,12 @@ lang_specific_driver (struct cl_decoded_option **i
   new_decoded_options[j++] = decoded_options[i++];
 
   /* If we are linking, pass -fsplit-stack if it is supported.  */
-#ifdef TARGET_CAN_SPLIT_STACK
+#if defined(TARGET_CAN_SPLIT_STACK) || defined(TARGET_CAN_SPLIT_STACK_64BIT)
+#ifdef TARGET_CAN_SPLIT_STACK_64BIT
+  if ((library >= 0) && !saw_opt_m32)
+#else
   if (library >= 0)
+#endif
     {
       generate_option (OPT_fsplit_stack, NULL, 1, CL_DRIVER,
 		       &new_decoded_options[j]);
@@ -381,13 +396,17 @@ lang_specific_driver (struct cl_decoded_option **i
     generate_option (OPT_shared_libgcc, NULL, 1, CL_DRIVER,
 		     &new_decoded_options[j++]);
 
-#ifdef TARGET_CAN_SPLIT_STACK
+#if defined(TARGET_CAN_SPLIT_STACK) || defined(TARGET_CAN_SPLIT_STACK_64BIT)
   /* libgcc wraps pthread_create to support split stack, however, due to
      relative ordering of -lpthread and -lgcc, we can't just mark
      __real_pthread_create in libgcc as non-weak.  But we need to link in
      pthread_create from pthread if we are statically linking, so we work-
      around by passing -u pthread_create to the linker. */
+#ifdef TARGET_CAN_SPLIT_STACK_64BIT
+  if (static_link && !saw_opt_m32)
+#else
   if (static_link)
+#endif
     {
       generate_option (OPT_Wl_, "-u,pthread_create", 1, CL_DRIVER,
 		       &new_decoded_options[j]);

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-27 21:37     ` Lynn A. Boger
@ 2015-09-15 16:50       ` Ian Lance Taylor
  2015-09-15 18:21       ` David Edelsohn
  1 sibling, 0 replies; 36+ messages in thread
From: Ian Lance Taylor @ 2015-09-15 16:50 UTC (permalink / raw)
  To: Lynn A. Boger; +Cc: Matthias Klose, gcc-patches, david Edelsohn, Alan Modra

On Thu, Aug 27, 2015 at 2:00 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> Here is an updated patch, with a summary of the differences from my previous
> patch:
>
> - 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
> -fuse-ld=gold
> if the gcc configure determines the alternate gold linker has split stack
> support.
> - 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
> split
> stack support was added recently and older gold linkers won't work.
> - The version checking of the gold linker was removed from the libgo
> configure
>  since gcc configure has already decided if it is correct.
> - TARGET_CAN_SPLIT_STACK_64BIT is now defined in sysv4.h if the glibc
> version
> 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
> linker.
>
> Bootstrapped and tested on x86_64, ppc64le, ppc64 (ran m32, m64 tests)
>
>
> 2015-08-27    Lynn Boger <laboger@linux.vnet.ibm.com>
>
> gcc/
>          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
> gold
>          linker supports split stack.
>          configure: Regenerate.
>          gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if
> HAVE_GOLD_ALTERNATE
>          is defined.
>          go/gospec.c:  (lang_specific_driver):  Use
> TARGET_CAN_SPLIT_STACK_64BIT
>          to control setting of fsplit-stack and u,pthread_create options for
> 64 bit
>          compiles.


I'm not sure who is going to approve this patch overall, but I'd
rather the gospec.c changes weren't so #ifdef heavy.  I would set m32
unconditionally.  Then write something like

   supports_split_stack = 0;
#ifdef TARGET_CAN_SPLIT_STACK
  supports_split_stack = 1;
#endif
#ifdef TARGET_CAN_SPLIT_STACK64
  if (m32)
    supports_split_stack = 0;
#endif

Then change the #ifdef TARGET_CAN_SPLIT_STACK code to test supports_split_stack.

Thanks.

Ian

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-08-27 21:37     ` Lynn A. Boger
  2015-09-15 16:50       ` Ian Lance Taylor
@ 2015-09-15 18:21       ` David Edelsohn
  2015-09-15 18:31         ` Lynn A. Boger
  1 sibling, 1 reply; 36+ messages in thread
From: David Edelsohn @ 2015-09-15 18:21 UTC (permalink / raw)
  To: Lynn A. Boger; +Cc: Matthias Klose, gcc-patches, Ian Taylor, Alan Modra

On Thu, Aug 27, 2015 at 5:00 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> Here is an updated patch, with a summary of the differences from my previous
> patch:
>
> - 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
> -fuse-ld=gold
> if the gcc configure determines the alternate gold linker has split stack
> support.
> - 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
> split
> stack support was added recently and older gold linkers won't work.
> - The version checking of the gold linker was removed from the libgo
> configure
>  since gcc configure has already decided if it is correct.
> - TARGET_CAN_SPLIT_STACK_64BIT is now defined in sysv4.h if the glibc
> version
> 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
> linker.
>
> Bootstrapped and tested on x86_64, ppc64le, ppc64 (ran m32, m64 tests)
>
>
> 2015-08-27    Lynn Boger <laboger@linux.vnet.ibm.com>
>
> gcc/
>          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
> gold
>          linker supports split stack.
>          configure: Regenerate.
>          gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if
> HAVE_GOLD_ALTERNATE
>          is defined.
>          go/gospec.c:  (lang_specific_driver):  Use
> TARGET_CAN_SPLIT_STACK_64BIT
>          to control setting of fsplit-stack and u,pthread_create options for
> 64 bit
>          compiles.

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
some distros.

- David

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-09-15 18:21       ` David Edelsohn
@ 2015-09-15 18:31         ` Lynn A. Boger
  2015-09-15 20:04           ` Ian Lance Taylor
  0 siblings, 1 reply; 36+ messages in thread
From: Lynn A. Boger @ 2015-09-15 18:31 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Matthias Klose, gcc-patches, Ian Taylor, Alan Modra

I will make the changes Ian suggested to gospec.c and was
planning to fix the sed string in gcc/configure.ac as David suggested.

I need some feedback on whether to enable the gold linker at
all for split stack on platforms other than Power in gcc/configure.ac.
I don't know if there are gold linker versions that should be verified for
non-Power platforms.  My first patch only enabled it on Power and that
  is what I think should be done.  Those who would like to use gold
with split stack for other platforms can enable it under the appropriate
conditions.

On 09/15/2015 01:18 PM, David Edelsohn wrote:
> On Thu, Aug 27, 2015 at 5:00 PM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> Here is an updated patch, with a summary of the differences from my previous
>> patch:
>>
>> - 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
>> -fuse-ld=gold
>> if the gcc configure determines the alternate gold linker has split stack
>> support.
>> - 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
>> split
>> stack support was added recently and older gold linkers won't work.
>> - The version checking of the gold linker was removed from the libgo
>> configure
>>   since gcc configure has already decided if it is correct.
>> - TARGET_CAN_SPLIT_STACK_64BIT is now defined in sysv4.h if the glibc
>> version
>> 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
>> linker.
>>
>> Bootstrapped and tested on x86_64, ppc64le, ppc64 (ran m32, m64 tests)
>>
>>
>> 2015-08-27    Lynn Boger <laboger@linux.vnet.ibm.com>
>>
>> gcc/
>>           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
>> gold
>>           linker supports split stack.
>>           configure: Regenerate.
>>           gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if
>> HAVE_GOLD_ALTERNATE
>>           is defined.
>>           go/gospec.c:  (lang_specific_driver):  Use
>> TARGET_CAN_SPLIT_STACK_64BIT
>>           to control setting of fsplit-stack and u,pthread_create options for
>> 64 bit
>>           compiles.
> 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
> some distros.
>
> - David
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-09-15 18:31         ` Lynn A. Boger
@ 2015-09-15 20:04           ` Ian Lance Taylor
  2015-09-17 19:15             ` Lynn A. Boger
  0 siblings, 1 reply; 36+ messages in thread
From: Ian Lance Taylor @ 2015-09-15 20:04 UTC (permalink / raw)
  To: Lynn A. Boger; +Cc: David Edelsohn, Matthias Klose, gcc-patches, Alan Modra

On Tue, Sep 15, 2015 at 11:24 AM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
>
> I need some feedback on whether to enable the gold linker at
> all for split stack on platforms other than Power in gcc/configure.ac.
> I don't know if there are gold linker versions that should be verified for
> non-Power platforms.  My first patch only enabled it on Power and that
>  is what I think should be done.  Those who would like to use gold
> with split stack for other platforms can enable it under the appropriate
> conditions.

I think that is fine for now.  If you want to enable gold for
i386/x86_64 with -fsplit-stack, that is also fine.

Ian

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-09-15 20:04           ` Ian Lance Taylor
@ 2015-09-17 19:15             ` Lynn A. Boger
  2015-09-18 12:59               ` David Edelsohn
       [not found]               ` <CAOyqgcVA_zhivM0+qRFk9bDT42Sot-HX95M1NtZjLVphZy_0vg@mail.gmail.com>
  0 siblings, 2 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-09-17 19:15 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: David Edelsohn, Matthias Klose, gcc-patches, Alan Modra

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

Here is my updated patch, with the changes suggested by
Ian for gcc/gospec.c and David for gcc/configure.ac.

Bootstrap built and tested on ppc64le, ppc64 multilib.

2015-09-17    Lynn Boger <laboger@linux.vnet.ibm.com>
gcc/
             PR target/66870
             config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK_64BIT
             config.in:  Set up HAVE_GOLD_ALTERNATE_SPLIT_STACK
             configure.ac:  Define HAVE_GOLD_ALTERNATE_SPLIT_STACK
             on Power based on gold linker version
             configure:  Regenerate
             gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if
             HAVE_GOLD_ALTERNATE_SPLIT_STACK defined
             go/gospec.c:  (lang_specific_driver):  Set appropriate 
split stack
             options for 64 bit compiles based on 
TARGET_CAN_SPLIT_STACK_64BIT

On 09/15/2015 02:58 PM, Ian Lance Taylor wrote:
> On Tue, Sep 15, 2015 at 11:24 AM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com>  wrote:
>> I need some feedback on whether to enable the gold linker at
>> all for split stack on platforms other than Power in gcc/configure.ac.
>> I don't know if there are gold linker versions that should be verified for
>> non-Power platforms.  My first patch only enabled it on Power and that
>>   is what I think should be done.  Those who would like to use gold
>> with split stack for other platforms can enable it under the appropriate
>> conditions.
> I think that is fine for now.  If you want to enable gold for
> i386/x86_64 with -fsplit-stack, that is also fine.
>
> Ian
>
>


[-- Attachment #2: gccgo-config-gold-submit-150916.diff --]
[-- Type: text/x-patch, Size: 6115 bytes --]

Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 227812)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -940,6 +940,14 @@ ncrtn.o%s"
 #undef TARGET_ASAN_SHADOW_OFFSET
 #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
 
+/* On ppc64 and ppc64le, split stack is only support for
+   64 bit. */
+#undef TARGET_CAN_SPLIT_STACK_64BIT
+#if TARGET_GLIBC_MAJOR > 2 \
+  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
+#define TARGET_CAN_SPLIT_STACK_64BIT
+#endif
+
 /* This target uses the sysv4.opt file.  */
 #define TARGET_USES_SYSV4_OPT 1
 
Index: gcc/config.in
===================================================================
--- gcc/config.in	(revision 227812)
+++ gcc/config.in	(working copy)
@@ -1310,6 +1310,12 @@
 #endif
 
 
+/* Define if the gold linker with split stack is available as a non-default */
+#ifndef USED_FOR_TARGET
+#undef HAVE_GOLD_NON_DEFAULT_SPLIT_STACK
+#endif
+
+
 /* Define if you have the iconv() function. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_ICONV
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 227812)
+++ gcc/configure.ac	(working copy)
@@ -2247,6 +2247,42 @@ if test x$gcc_cv_ld != x; then
 fi
 AC_MSG_RESULT($ld_is_gold)
 
+AC_MSG_CHECKING(gold linker with split stack support as non default)
+# Check to see if default ld is not gold, but gold is
+# available and has support for split stack.  If gcc was configured
+# with gold then no checking is done.
+# 
+if test x$ld_is_gold = xno && which ${gcc_cv_ld}.gold >/dev/null 2>&1; then
+
+# For platforms other than powerpc64*, enable as appropriate.
+
+  gold_non_default=no
+  ld_gold=`which ${gcc_cv_ld}.gold`
+# Make sure this gold has minimal split stack support
+  if $ld_gold --help 2>/dev/null | grep split-stack-adjust-size >/dev/null 2>&1; then
+    ld_vers=`$ld_gold --version | sed 1q`
+    gold_vers=`echo $ld_vers | sed -n \
+          -e 's,^[[^)]]*[[  ]]\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*[[^)]]*\)) .*$,\1,p'`
+    case $target in
+# check that the gold version contains the complete split stack support
+# on powerpc64 big and little endian
+      powerpc64*-*-*)
+        case "$gold_vers" in
+          2.25.[[1-9]]*|2.2[[6-9]][[.0-9]]*|2.[[3-9]][[.0-9]]*|[[3-9]].[[.0-9]]*) gold_non_default=yes
+          ;;
+          *) gold_non_default=no
+          ;;
+        esac
+        ;;
+    esac
+  fi
+  if test $gold_non_default = yes; then
+    AC_DEFINE(HAVE_GOLD_NON_DEFAULT_SPLIT_STACK, 1,
+    	    [Define if the gold linker supports split stack and is available as a non-default])
+  fi
+fi
+AC_MSG_RESULT($gold_non_default)
+
 ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
 AC_SUBST(ORIGINAL_LD_FOR_TARGET)
 case "$ORIGINAL_LD_FOR_TARGET" in
Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c	(revision 227812)
+++ gcc/gcc.c	(working copy)
@@ -666,7 +666,11 @@ proper position among the other output files.  */
    libgcc.  This is not yet a real spec, though it could become one;
    it is currently just stuffed into LINK_SPEC.  FIXME: This wrapping
    only works with GNU ld and gold.  */
+#ifdef HAVE_GOLD_NON_DEFAULT_SPLIT_STACK
+#define STACK_SPLIT_SPEC " %{fsplit-stack: -fuse-ld=gold --wrap=pthread_create}"
+#else
 #define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}"
+#endif
 
 #ifndef LIBASAN_SPEC
 #define STATIC_LIBASAN_LIBS \
Index: gcc/go/gospec.c
===================================================================
--- gcc/go/gospec.c	(revision 227812)
+++ gcc/go/gospec.c	(working copy)
@@ -106,6 +106,9 @@ lang_specific_driver (struct cl_decoded_option **i
   /* The total number of arguments with the new stuff.  */
   int num_args = 1;
 
+  /* Supports split stack */
+  int supports_split_stack = 0;
+
   /* Whether the -o option was used.  */
   bool saw_opt_o = false;
 
@@ -117,6 +120,9 @@ lang_specific_driver (struct cl_decoded_option **i
   /* Whether the -S option was used.  */
   bool saw_opt_S = false;
 
+  /* Whether the -m32 option was used. */
+  bool saw_opt_m32 = false;
+
   /* The first input file with an extension of .go.  */
   const char *first_go_file = NULL;  
 
@@ -152,6 +158,10 @@ lang_specific_driver (struct cl_decoded_option **i
 	    library = (library == 0) ? 1 : library;
 	  break;
 
+	case OPT_m32:
+	  saw_opt_m32 = true;
+	  break;
+
 	case OPT_pg:
 	case OPT_p:
 	  saw_profile_flag = true;
@@ -236,15 +246,22 @@ lang_specific_driver (struct cl_decoded_option **i
   /* Copy the 0th argument, i.e., the name of the program itself.  */
   new_decoded_options[j++] = decoded_options[i++];
 
+#ifdef TARGET_CAN_SPLIT_STACK
+  supports_split_stack = 1;
+#endif
+
+#ifdef TARGET_CAN_SPLIT_STACK_64BIT
+  if (!saw_opt_m32)
+    supports_split_stack = 1;
+#endif
+
   /* If we are linking, pass -fsplit-stack if it is supported.  */
-#ifdef TARGET_CAN_SPLIT_STACK
-  if (library >= 0)
+  if ((library >= 0) && supports_split_stack)
     {
       generate_option (OPT_fsplit_stack, NULL, 1, CL_DRIVER,
 		       &new_decoded_options[j]);
       j++;
     }
-#endif
 
   /* NOTE: We start at 1 now, not 0.  */
   while (i < argc)
@@ -381,19 +398,17 @@ lang_specific_driver (struct cl_decoded_option **i
     generate_option (OPT_shared_libgcc, NULL, 1, CL_DRIVER,
 		     &new_decoded_options[j++]);
 
-#ifdef TARGET_CAN_SPLIT_STACK
   /* libgcc wraps pthread_create to support split stack, however, due to
      relative ordering of -lpthread and -lgcc, we can't just mark
      __real_pthread_create in libgcc as non-weak.  But we need to link in
      pthread_create from pthread if we are statically linking, so we work-
      around by passing -u pthread_create to the linker. */
-  if (static_link)
+  if (static_link && supports_split_stack)
     {
       generate_option (OPT_Wl_, "-u,pthread_create", 1, CL_DRIVER,
 		       &new_decoded_options[j]);
       j++;
     }
-#endif
 
 #if defined(TARGET_SOLARIS) && !defined(USE_GLD)
   /* We use a common symbol for go$zerovalue.  On Solaris, when not


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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-09-17 19:15             ` Lynn A. Boger
@ 2015-09-18 12:59               ` David Edelsohn
  2015-09-30 12:46                 ` Lynn A. Boger
       [not found]               ` <CAOyqgcVA_zhivM0+qRFk9bDT42Sot-HX95M1NtZjLVphZy_0vg@mail.gmail.com>
  1 sibling, 1 reply; 36+ messages in thread
From: David Edelsohn @ 2015-09-18 12:59 UTC (permalink / raw)
  To: Lynn A. Boger; +Cc: Ian Lance Taylor, Matthias Klose, gcc-patches, Alan Modra

On Thu, Sep 17, 2015 at 3:13 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> Here is my updated patch, with the changes suggested by
> Ian for gcc/gospec.c and David for gcc/configure.ac.
>
> Bootstrap built and tested on ppc64le, ppc64 multilib.
>
> 2015-09-17    Lynn Boger <laboger@linux.vnet.ibm.com>
> gcc/
>             PR target/66870
>             config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK_64BIT
>             config.in:  Set up HAVE_GOLD_ALTERNATE_SPLIT_STACK
>             configure.ac:  Define HAVE_GOLD_ALTERNATE_SPLIT_STACK
>             on Power based on gold linker version
>             configure:  Regenerate
>             gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if
>             HAVE_GOLD_ALTERNATE_SPLIT_STACK defined
>             go/gospec.c:  (lang_specific_driver):  Set appropriate split
> stack
>             options for 64 bit compiles based on
> TARGET_CAN_SPLIT_STACK_64BIT

The rs6000 bits are okay with me.

Ian needs to approve the go bits.  And Ian or a configure maintainer
needs to approve the other bits.

Thanks, David

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-09-18 12:59               ` David Edelsohn
@ 2015-09-30 12:46                 ` Lynn A. Boger
  0 siblings, 0 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-09-30 12:46 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Ian Lance Taylor, Matthias Klose, gcc-patches, Alan Modra

Any update on this patch?

On 09/18/2015 07:48 AM, David Edelsohn wrote:
> On Thu, Sep 17, 2015 at 3:13 PM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> Here is my updated patch, with the changes suggested by
>> Ian for gcc/gospec.c and David for gcc/configure.ac.
>>
>> Bootstrap built and tested on ppc64le, ppc64 multilib.
>>
>> 2015-09-17    Lynn Boger <laboger@linux.vnet.ibm.com>
>> gcc/
>>              PR target/66870
>>              config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK_64BIT
>>              config.in:  Set up HAVE_GOLD_ALTERNATE_SPLIT_STACK
>>              configure.ac:  Define HAVE_GOLD_ALTERNATE_SPLIT_STACK
>>              on Power based on gold linker version
>>              configure:  Regenerate
>>              gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if
>>              HAVE_GOLD_ALTERNATE_SPLIT_STACK defined
>>              go/gospec.c:  (lang_specific_driver):  Set appropriate split
>> stack
>>              options for 64 bit compiles based on
>> TARGET_CAN_SPLIT_STACK_64BIT
> The rs6000 bits are okay with me.
>
> Ian needs to approve the go bits.  And Ian or a configure maintainer
> needs to approve the other bits.
>
> Thanks, David
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
       [not found]               ` <CAOyqgcVA_zhivM0+qRFk9bDT42Sot-HX95M1NtZjLVphZy_0vg@mail.gmail.com>
@ 2015-10-03 18:31                 ` Matthias Klose
       [not found]                   ` <56153C00.2000209@linux.vnet.ibm.com>
  0 siblings, 1 reply; 36+ messages in thread
From: Matthias Klose @ 2015-10-03 18:31 UTC (permalink / raw)
  To: Ian Lance Taylor, Lynn A. Boger; +Cc: David Edelsohn, gcc-patches, Alan Modra

On 01.10.2015 01:07, Ian Lance Taylor wrote:
> On Thu, Sep 17, 2015 at 12:13 PM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> Here is my updated patch, with the changes suggested by
>> Ian for gcc/gospec.c and David for gcc/configure.ac.
>>
>> Bootstrap built and tested on ppc64le, ppc64 multilib.
>>
>> 2015-09-17    Lynn Boger <laboger@linux.vnet.ibm.com>
>> gcc/
>>              PR target/66870
>>              config/rs6000/sysv4.h:  Define TARGET_CAN_SPLIT_STACK_64BIT
>>              config.in:  Set up HAVE_GOLD_ALTERNATE_SPLIT_STACK
>>              configure.ac:  Define HAVE_GOLD_ALTERNATE_SPLIT_STACK
>>              on Power based on gold linker version
>>              configure:  Regenerate
>>              gcc.c:  Add -fuse-ld=gold to STACK_SPLIT_SPEC if
>>              HAVE_GOLD_ALTERNATE_SPLIT_STACK defined
>>              go/gospec.c:  (lang_specific_driver):  Set appropriate split
>> stack
>>              options for 64 bit compiles based on
>> TARGET_CAN_SPLIT_STACK_64BIT
>
> Thanks.  I had to add ATTRIBUTE_UNUSED to the new variable in
> go/gospec.c.  Committed with these ChangeLog entries:
>
> 2015-10-01  Lynn Boger  <laboger@linux.vnet.ibm.com>
>
> 	PR target/66870
> 	* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Define.
> 	* configure.ac: Define HAVE_GOLD_ALTERNATE_SPLIT_STACK on Power
> 	based on gold linker version.
> 	* gcc.c: Add -fuse-ld=gold to STACK_SPLIT_SPEC if
> 	HAVE_GOLD_ALTERNATE_SPLIT_STACK defined.
> 	* configure, config.in: Regenerate.
>
> 2015-10-01  Lynn Boger  <laboger@linux.vnet.ibm.com>
>
> 	PR target/66870
> 	* gospec.c (lang_specific_driver): Set appropriate split stack
> 	options for 64 bit compiles based on TARGET_CAN_SPLIT_STACK_64BIT.
>
> Ian
>

this causes the build to fail on powerpc-linux-gnu:

make[4]: Entering directory '/home/doko/gcc/gcc-snapshot-20151003/build/gotools'
/home/doko/gcc/gcc-snapshot-20151003/build/./gcc/gccgo 
-B/home/doko/gcc/gcc-snapshot-20151003/build/./gcc/ -g -O2  -static-libstdc++ 
-static-libgcc -Wl,-z,relro -L ../powerpc-linux-gnu/libgo -L 
../powerpc-linux-gnu/libgo/.libs -o go 
../../src/gotools/../libgo/go/cmd/go/build.go 
../../src/gotools/../libgo/go/cmd/go/clean.go 
../../src/gotools/../libgo/go/cmd/go/context.go 
../../src/gotools/../libgo/go/cmd/go/discovery.go 
../../src/gotools/../libgo/go/cmd/go/env.go 
../../src/gotools/../libgo/go/cmd/go/fix.go 
../../src/gotools/../libgo/go/cmd/go/fmt.go 
../../src/gotools/../libgo/go/cmd/go/generate.go 
../../src/gotools/../libgo/go/cmd/go/get.go 
../../src/gotools/../libgo/go/cmd/go/go11.go 
../../src/gotools/../libgo/go/cmd/go/help.go 
../../src/gotools/../libgo/go/cmd/go/http.go 
../../src/gotools/../libgo/go/cmd/go/list.go 
../../src/gotools/../libgo/go/cmd/go/main.go 
../../src/gotools/../libgo/go/cmd/go/pkg.go 
../../src/gotools/../libgo/go/cmd/go/run.go 
../../src/gotools/../libgo/go/cmd/go/signal.go 
../../src/gotools/../libgo/go/cmd/go/signal_unix.go 
../../src/gotools/../libgo/go/cmd/go/test.go 
../../src/gotools/../libgo/go/cmd/go/testflag.go 
../../src/gotools/../libgo/go/cmd/go/tool.go 
../../src/gotools/../libgo/go/cmd/go/vcs.go 
../../src/gotools/../libgo/go/cmd/go/version.go 
../../src/gotools/../libgo/go/cmd/go/vet.go 
../powerpc-linux-gnu/libgo/zstdpkglist.go zdefaultcc.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
Makefile:667: recipe for target 'go' failed
make[4]: *** [go] Error 1
make[4]: Leaving directory '/home/doko/gcc/gcc-snapshot-20151003/build/gotools'
Makefile:12908: recipe for target 'all-gotools' failed
make[3]: *** [all-gotools] Error 2

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
       [not found]                   ` <56153C00.2000209@linux.vnet.ibm.com>
@ 2015-10-07 17:04                     ` Ian Lance Taylor
  2015-10-07 17:25                       ` David Edelsohn
  2015-10-07 17:31                     ` Matthias Klose
  1 sibling, 1 reply; 36+ messages in thread
From: Ian Lance Taylor @ 2015-10-07 17:04 UTC (permalink / raw)
  To: Lynn A. Boger; +Cc: Matthias Klose, David Edelsohn, gcc-patches, Alan Modra

On Wed, Oct 7, 2015 at 8:36 AM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> Pretty sure this is the fix, but still doing some testing.

Looks good to me but I suppose David E. should approve.

Ian

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-07 17:04                     ` Ian Lance Taylor
@ 2015-10-07 17:25                       ` David Edelsohn
  0 siblings, 0 replies; 36+ messages in thread
From: David Edelsohn @ 2015-10-07 17:25 UTC (permalink / raw)
  To: Ian Lance Taylor, Lynn A. Boger, Matthias Klose; +Cc: gcc-patches, Alan Modra

On Wed, Oct 7, 2015 at 1:04 PM, Ian Lance Taylor <iant@golang.org> wrote:
> On Wed, Oct 7, 2015 at 8:36 AM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> Pretty sure this is the fix, but still doing some testing.
>
> Looks good to me but I suppose David E. should approve.

It's fine with me.  Thanks for fixing this.

Thanks, David

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
       [not found]                   ` <56153C00.2000209@linux.vnet.ibm.com>
  2015-10-07 17:04                     ` Ian Lance Taylor
@ 2015-10-07 17:31                     ` Matthias Klose
       [not found]                       ` <5615746C.3030509@linux.vnet.ibm.com>
  2015-10-08 18:56                       ` Lynn A. Boger
  1 sibling, 2 replies; 36+ messages in thread
From: Matthias Klose @ 2015-10-07 17:31 UTC (permalink / raw)
  To: Lynn A. Boger, Ian Lance Taylor; +Cc: David Edelsohn, gcc-patches, Alan Modra

On 07.10.2015 17:36, Lynn A. Boger wrote:
> Pretty sure this is the fix, but still doing some testing.

linux.h isn't included for multilib enabled builds defaulting to 
powerpc-linux-gnu, I am currently testing

--- gcc/config/rs6000/sysv4.h	(revision 228571)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -943,8 +943,9 @@
  /* On ppc64 and ppc64le, split stack is only support for
     64 bit. */
  #undef TARGET_CAN_SPLIT_STACK_64BIT
-#if TARGET_GLIBC_MAJOR > 2 \
-  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
+#if TARGET_64BIT \
+  && (TARGET_GLIBC_MAJOR > 2 \
+      || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18))
  #define TARGET_CAN_SPLIT_STACK_64BIT
  #endif



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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
       [not found]                       ` <5615746C.3030509@linux.vnet.ibm.com>
@ 2015-10-07 21:58                         ` David Edelsohn
  0 siblings, 0 replies; 36+ messages in thread
From: David Edelsohn @ 2015-10-07 21:58 UTC (permalink / raw)
  To: Lynn A. Boger; +Cc: Matthias Klose, Ian Lance Taylor, gcc-patches, Alan Modra

On Wed, Oct 7, 2015 at 3:37 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> Right I didn't think of the multilib on powerpc-linux-gnu (actually didn't
> think that was allowed).
>
> I don't think TARGET_64BIT will work here (I tried it), because on ppc64 &
> ppc64le it gets replaced with a code snippet to check
> a value in rs6000_isa_flags.  Based on how it is used here, it has to be a
> compile time define, not a bit checked
> at runtime.
>
> However, I think #if TARGET_POWERPC64 == 1 should work instead of
> TARGET_64BIT and I believe that will do the trick.
>
> Let me try that out on the ppc64 & ppc64le targets to make sure it still
> works as it should.

TARGET_POWERPC64 is not the correct test.

- David

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-07 17:31                     ` Matthias Klose
       [not found]                       ` <5615746C.3030509@linux.vnet.ibm.com>
@ 2015-10-08 18:56                       ` Lynn A. Boger
  2015-10-08 20:46                         ` Matthias Klose
  1 sibling, 1 reply; 36+ messages in thread
From: Lynn A. Boger @ 2015-10-08 18:56 UTC (permalink / raw)
  To: Matthias Klose, Ian Lance Taylor; +Cc: David Edelsohn, gcc-patches, Alan Modra

I think my original fix with linux.h doing the #undef on 
TARGET_CAN_SPLIT_STACK_64BIT is the right fix at least
for powerpc-linux-gnu 32 bit only.

It works for powerpc-linux-gnu without multilib and doesn't break 
powerpc64-linux-gnu or powerpc64le-linux-gnu.

Can you tell me how you are configuring the multilib build that defaults 
to powerpc-linux-gnu and how it
fails?  Maybe there is another problem for that combination.

As David noted, the use of TARGET_64BIT or TARGET_POWERPC64 won't work 
for this #define.

On 10/07/2015 12:31 PM, Matthias Klose wrote:
> On 07.10.2015 17:36, Lynn A. Boger wrote:
>> Pretty sure this is the fix, but still doing some testing.
>
> linux.h isn't included for multilib enabled builds defaulting to 
> powerpc-linux-gnu, I am currently testing
>
> --- gcc/config/rs6000/sysv4.h    (revision 228571)
> +++ gcc/config/rs6000/sysv4.h    (working copy)
> @@ -943,8 +943,9 @@
>  /* On ppc64 and ppc64le, split stack is only support for
>     64 bit. */
>  #undef TARGET_CAN_SPLIT_STACK_64BIT
> -#if TARGET_GLIBC_MAJOR > 2 \
> -  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
> +#if TARGET_64BIT \
> +  && (TARGET_GLIBC_MAJOR > 2 \
> +      || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18))
>  #define TARGET_CAN_SPLIT_STACK_64BIT
>  #endif
>
>
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-08 18:56                       ` Lynn A. Boger
@ 2015-10-08 20:46                         ` Matthias Klose
  2015-10-09 20:17                           ` Lynn A. Boger
  0 siblings, 1 reply; 36+ messages in thread
From: Matthias Klose @ 2015-10-08 20:46 UTC (permalink / raw)
  To: Lynn A. Boger, Ian Lance Taylor; +Cc: David Edelsohn, gcc-patches, Alan Modra

On 08.10.2015 20:56, Lynn A. Boger wrote:
> I think my original fix with linux.h doing the #undef on
> TARGET_CAN_SPLIT_STACK_64BIT is the right fix at least
> for powerpc-linux-gnu 32 bit only.
>
> It works for powerpc-linux-gnu without multilib and doesn't break
> powerpc64-linux-gnu or powerpc64le-linux-gnu.
>
> Can you tell me how you are configuring the multilib build that defaults to
> powerpc-linux-gnu and how it
> fails?  Maybe there is another problem for that combination.

Configured with: -v
	 --with-pkgversion='Ubuntu 20151005-0ubuntu1'
	 --with-bugurl='file:///usr/share/doc/gcc-snapshot/README.Bugs'
	 --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++
	 --prefix=/usr/lib/gcc-snapshot
	 --enable-shared
	 --enable-linker-build-id
	 --disable-nls
	 --with-sysroot=/
	 --enable-clocale=gnu
	 --enable-libstdcxx-debug
	 --enable-libstdcxx-time=yes
	 --with-default-libstdcxx-abi=new
	 --enable-gnu-unique-object
	 --disable-libitm
	 --disable-libquadmath
	 --enable-plugin
	 --with-system-zlib
	 --disable-browser-plugin
	 --enable-java-awt=gtk
	 --enable-gtk-cairo
	 --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc/jre
	 --enable-java-home
	 --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc
	 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-snap-powerpc
	 --with-arch-directory=ppc
	 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
	 --enable-objc-gc
	 --enable-secureplt
	 --disable-softfloat
	 --with-cpu=default32
	 --disable-softfloat
	 --enable-targets=powerpc-linux,powerpc64-linux
	 --enable-multiarch
	 --disable-werror
	 --with-long-double-128
	 --enable-multilib
	 --enable-checking=yes
	 --build=powerpc-linux-gnu
	 --host=powerpc-linux-gnu
	 --target=powerpc-linux-gnu

fails in gotools with:
cc1: error: '-fsplit-stack' currently only supported on PowerPC64 GNU/Linux with 
glibc-2.18 or later
cc1: error: '-fsplit-stack' is not supported by this compiler configuration

this information is from the log below, but it's a parallel build, so a bit useless
https://launchpadlibrarian.net/220374353/buildlog_ubuntu-wily-powerpc.gcc-snapshot_20151005-0ubuntu1_BUILDING.txt.gz

> As David noted, the use of TARGET_64BIT or TARGET_POWERPC64 won't work for this
> #define.

I found that out too =)  Note that ada builds are currently broken on the trunk.

Matthias

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-08 20:46                         ` Matthias Klose
@ 2015-10-09 20:17                           ` Lynn A. Boger
  2015-10-10 14:00                             ` David Edelsohn
  2015-10-10 21:25                             ` Andreas Schwab
  0 siblings, 2 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-10-09 20:17 UTC (permalink / raw)
  To: Matthias Klose, Ian Lance Taylor; +Cc: David Edelsohn, gcc-patches, Alan Modra

[-- Attachment #1: Type: text/plain, Size: 2859 bytes --]

Here's a new one.

Tried all the variations, verified that split stack is still enabled and 
uses gold linker for 64 bit targets
when using a 64 bit default compiler, and does not give the split stack 
error for 32 bit default
compilers.

On 10/08/2015 03:46 PM, Matthias Klose wrote:
> On 08.10.2015 20:56, Lynn A. Boger wrote:
>> I think my original fix with linux.h doing the #undef on
>> TARGET_CAN_SPLIT_STACK_64BIT is the right fix at least
>> for powerpc-linux-gnu 32 bit only.
>>
>> It works for powerpc-linux-gnu without multilib and doesn't break
>> powerpc64-linux-gnu or powerpc64le-linux-gnu.
>>
>> Can you tell me how you are configuring the multilib build that 
>> defaults to
>> powerpc-linux-gnu and how it
>> fails?  Maybe there is another problem for that combination.
>
> Configured with: -v
>      --with-pkgversion='Ubuntu 20151005-0ubuntu1'
> --with-bugurl='file:///usr/share/doc/gcc-snapshot/README.Bugs'
>      --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++
>      --prefix=/usr/lib/gcc-snapshot
>      --enable-shared
>      --enable-linker-build-id
>      --disable-nls
>      --with-sysroot=/
>      --enable-clocale=gnu
>      --enable-libstdcxx-debug
>      --enable-libstdcxx-time=yes
>      --with-default-libstdcxx-abi=new
>      --enable-gnu-unique-object
>      --disable-libitm
>      --disable-libquadmath
>      --enable-plugin
>      --with-system-zlib
>      --disable-browser-plugin
>      --enable-java-awt=gtk
>      --enable-gtk-cairo
> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc/jre
>      --enable-java-home
> --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc
> --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-snap-powerpc
>      --with-arch-directory=ppc
>      --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
>      --enable-objc-gc
>      --enable-secureplt
>      --disable-softfloat
>      --with-cpu=default32
>      --disable-softfloat
>      --enable-targets=powerpc-linux,powerpc64-linux
>      --enable-multiarch
>      --disable-werror
>      --with-long-double-128
>      --enable-multilib
>      --enable-checking=yes
>      --build=powerpc-linux-gnu
>      --host=powerpc-linux-gnu
>      --target=powerpc-linux-gnu
>
> fails in gotools with:
> cc1: error: '-fsplit-stack' currently only supported on PowerPC64 
> GNU/Linux with glibc-2.18 or later
> cc1: error: '-fsplit-stack' is not supported by this compiler 
> configuration
>
> this information is from the log below, but it's a parallel build, so 
> a bit useless
> https://launchpadlibrarian.net/220374353/buildlog_ubuntu-wily-powerpc.gcc-snapshot_20151005-0ubuntu1_BUILDING.txt.gz 
>
>
>> As David noted, the use of TARGET_64BIT or TARGET_POWERPC64 won't 
>> work for this
>> #define.
>
> I found that out too =)  Note that ada builds are currently broken on 
> the trunk.
>
> Matthias
>
>


[-- Attachment #2: gccgo-ss-ppc32.diff --]
[-- Type: text/x-patch, Size: 1545 bytes --]

Index: gcc/common/config/rs6000/rs6000-common.c
===================================================================
--- gcc/common/config/rs6000/rs6000-common.c	(revision 228653)
+++ gcc/common/config/rs6000/rs6000-common.c	(working copy)
@@ -303,10 +303,12 @@ rs6000_supports_split_stack (bool report,
 #define TARGET_GLIBC_MINOR 0
 #endif
   /* Note: Can't test DEFAULT_ABI here, it isn't set until later.  */
+#ifdef TARGET_CAN_SPLIT_STACK_64BIT
   if (TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018
       && TARGET_64BIT
       && TARGET_ELF)
     return true;
+#endif
 
   if (report)
     error ("%<-fsplit-stack%> currently only supported on PowerPC64 GNU/Linux with glibc-2.18 or later");
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 228653)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -940,13 +940,15 @@ ncrtn.o%s"
 #undef TARGET_ASAN_SHADOW_OFFSET
 #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
 
-/* On ppc64 and ppc64le, split stack is only support for
-   64 bit. */
+/* On ppc64 and ppc64le, split stack is only supported for
+   64 bit targets with a 64 bit compiler. */
 #undef TARGET_CAN_SPLIT_STACK_64BIT
+#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__)
 #if TARGET_GLIBC_MAJOR > 2 \
   || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
 #define TARGET_CAN_SPLIT_STACK_64BIT
 #endif
+#endif
 
 /* This target uses the sysv4.opt file.  */
 #define TARGET_USES_SYSV4_OPT 1

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-09 20:17                           ` Lynn A. Boger
@ 2015-10-10 14:00                             ` David Edelsohn
  2015-10-10 21:03                               ` Matthias Klose
  2015-10-10 21:25                             ` Andreas Schwab
  1 sibling, 1 reply; 36+ messages in thread
From: David Edelsohn @ 2015-10-10 14:00 UTC (permalink / raw)
  To: Lynn A. Boger, Matthias Klose; +Cc: Ian Lance Taylor, gcc-patches, Alan Modra

On Fri, Oct 9, 2015 at 3:51 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> Here's a new one.
>
> Tried all the variations, verified that split stack is still enabled and
> uses gold linker for 64 bit targets
> when using a 64 bit default compiler, and does not give the split stack
> error for 32 bit default
> compilers.

This is okay if Matthias confirms that it works.

Thanks, David

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-10 14:00                             ` David Edelsohn
@ 2015-10-10 21:03                               ` Matthias Klose
  0 siblings, 0 replies; 36+ messages in thread
From: Matthias Klose @ 2015-10-10 21:03 UTC (permalink / raw)
  To: David Edelsohn, Lynn A. Boger; +Cc: Ian Lance Taylor, gcc-patches, Alan Modra

On 10.10.2015 16:00, David Edelsohn wrote:
> On Fri, Oct 9, 2015 at 3:51 PM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> Here's a new one.
>>
>> Tried all the variations, verified that split stack is still enabled and
>> uses gold linker for 64 bit targets
>> when using a 64 bit default compiler, and does not give the split stack
>> error for 32 bit default
>> compilers.
>
> This is okay if Matthias confirms that it works.

yes, that fixes the build error.

using the preprocessor for this kind of check, you get wrong results for gcc 
-m32 on powerpc64, and for gcc -m64 on powerpc.  The former looks like wrong 
code, while the latter is just missed optimization.  Not sure if it is worth 
fixing this.

I lost track of the x86 status. Is this now enabled there as well?

Matthias

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-09 20:17                           ` Lynn A. Boger
  2015-10-10 14:00                             ` David Edelsohn
@ 2015-10-10 21:25                             ` Andreas Schwab
  2015-10-11 13:07                               ` Alan Modra
  1 sibling, 1 reply; 36+ messages in thread
From: Andreas Schwab @ 2015-10-10 21:25 UTC (permalink / raw)
  To: Lynn A. Boger
  Cc: Matthias Klose, Ian Lance Taylor, David Edelsohn, gcc-patches,
	Alan Modra

"Lynn A. Boger" <laboger@linux.vnet.ibm.com> writes:

> Index: gcc/config/rs6000/sysv4.h
> ===================================================================
> --- gcc/config/rs6000/sysv4.h	(revision 228653)
> +++ gcc/config/rs6000/sysv4.h	(working copy)
> @@ -940,13 +940,15 @@ ncrtn.o%s"
>  #undef TARGET_ASAN_SHADOW_OFFSET
>  #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
>  
> -/* On ppc64 and ppc64le, split stack is only support for
> -   64 bit. */
> +/* On ppc64 and ppc64le, split stack is only supported for
> +   64 bit targets with a 64 bit compiler. */
>  #undef TARGET_CAN_SPLIT_STACK_64BIT
> +#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__)

This doesn't make sense.  A target header cannot use host defines.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-10 21:25                             ` Andreas Schwab
@ 2015-10-11 13:07                               ` Alan Modra
  2015-10-11 14:43                                 ` Andreas Schwab
                                                   ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: Alan Modra @ 2015-10-11 13:07 UTC (permalink / raw)
  To: Ian Lance Taylor, David Edelsohn
  Cc: Lynn A. Boger, Andreas Schwab, Matthias Klose, gcc-patches

On Sat, Oct 10, 2015 at 11:25:38PM +0200, Andreas Schwab wrote:
> "Lynn A. Boger" <laboger@linux.vnet.ibm.com> writes:
> 
> > Index: gcc/config/rs6000/sysv4.h
> > ===================================================================
> > --- gcc/config/rs6000/sysv4.h	(revision 228653)
> > +++ gcc/config/rs6000/sysv4.h	(working copy)
> > @@ -940,13 +940,15 @@ ncrtn.o%s"
> >  #undef TARGET_ASAN_SHADOW_OFFSET
> >  #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
> >  
> > -/* On ppc64 and ppc64le, split stack is only support for
> > -   64 bit. */
> > +/* On ppc64 and ppc64le, split stack is only supported for
> > +   64 bit targets with a 64 bit compiler. */
> >  #undef TARGET_CAN_SPLIT_STACK_64BIT
> > +#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__)
> 
> This doesn't make sense.  A target header cannot use host defines.

Right.  Here's a better fix.  A powerpc-linux biarch compiler can
default to either -m32 or -m64 so we need to take that into account,
and notice both -m32 and -m64 on the gccgo command line.  It's also
possible to build a -m64 only compiler, so in that case we can define
TARGET_CAN_SPLIT_STACK.

Bootstrapped etc. powerpc64-linux, powerpc-linux and
powerpc64le-linux.  OK?

gcc/
	* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
	* config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
	(TARGET_CAN_SPLIT_STACK_64BIT): Define.
gcc/go/
	* gospec.c (saw_opt_m32): Rename to..
	(is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
	Update uses.
	(lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.

diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 7b2f9bd..f48af43 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -940,14 +940,6 @@ ncrtn.o%s"
 #undef TARGET_ASAN_SHADOW_OFFSET
 #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
 
-/* On ppc64 and ppc64le, split stack is only support for
-   64 bit. */
-#undef TARGET_CAN_SPLIT_STACK_64BIT
-#if TARGET_GLIBC_MAJOR > 2 \
-  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
-#define TARGET_CAN_SPLIT_STACK_64BIT
-#endif
-
 /* This target uses the sysv4.opt file.  */
 #define TARGET_USES_SYSV4_OPT 1
 
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 9599735..28c83e41 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -245,6 +245,21 @@ extern int dot_symbols;
 #define MULTILIB_DEFAULTS { "m32" }
 #endif
 
+/* Split stack is only supported for 64 bit, and requires glibc >= 2.18.  */
+#if TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018
+# ifndef RS6000_BI_ARCH
+#  define TARGET_CAN_SPLIT_STACK
+# else
+#  if DEFAULT_ARCH64_P
+/* Supported, and the default is -m64  */
+#   define TARGET_CAN_SPLIT_STACK_64BIT 1
+#  else
+/* Supported, and the default is -m32  */
+#   define TARGET_CAN_SPLIT_STACK_64BIT 0
+#  endif
+# endif
+#endif
+
 #ifndef RS6000_BI_ARCH
 
 /* 64-bit PowerPC Linux always has a TOC.  */
diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c
index ca3c2d7..fbb55be 100644
--- a/gcc/go/gospec.c
+++ b/gcc/go/gospec.c
@@ -120,8 +120,10 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
   /* Whether the -S option was used.  */
   bool saw_opt_S = false;
 
-  /* Whether the -m32 option was used. */
-  bool saw_opt_m32 ATTRIBUTE_UNUSED = false;
+#ifdef TARGET_CAN_SPLIT_STACK_64BIT
+  /* Whether the -m64 option is in force. */
+  bool is_m64 = TARGET_CAN_SPLIT_STACK_64BIT;
+#endif
 
   /* The first input file with an extension of .go.  */
   const char *first_go_file = NULL;  
@@ -160,7 +162,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
 
 #ifdef TARGET_CAN_SPLIT_STACK_64BIT
 	case OPT_m32:
-	  saw_opt_m32 = true;
+	  is_m64 = false;
+	  break;
+
+	case OPT_m64:
+	  is_m64 = true;
 	  break;
 #endif
 
@@ -253,7 +259,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
 #endif
 
 #ifdef TARGET_CAN_SPLIT_STACK_64BIT
-  if (!saw_opt_m32)
+  if (is_m64)
     supports_split_stack = 1;
 #endif
 


-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-11 13:07                               ` Alan Modra
@ 2015-10-11 14:43                                 ` Andreas Schwab
  2015-10-11 18:29                                   ` Ian Lance Taylor
  2015-10-12 15:15                                 ` Lynn A. Boger
                                                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 36+ messages in thread
From: Andreas Schwab @ 2015-10-11 14:43 UTC (permalink / raw)
  To: Alan Modra
  Cc: Ian Lance Taylor, David Edelsohn, Lynn A. Boger, Matthias Klose,
	gcc-patches

Alan Modra <amodra@gmail.com> writes:

> diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c
> index ca3c2d7..fbb55be 100644
> --- a/gcc/go/gospec.c
> +++ b/gcc/go/gospec.c
> @@ -120,8 +120,10 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
>    /* Whether the -S option was used.  */
>    bool saw_opt_S = false;
>  
> -  /* Whether the -m32 option was used. */
> -  bool saw_opt_m32 ATTRIBUTE_UNUSED = false;
> +#ifdef TARGET_CAN_SPLIT_STACK_64BIT
> +  /* Whether the -m64 option is in force. */
> +  bool is_m64 = TARGET_CAN_SPLIT_STACK_64BIT;
> +#endif
>  
>    /* The first input file with an extension of .go.  */
>    const char *first_go_file = NULL;  
> @@ -160,7 +162,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
>  
>  #ifdef TARGET_CAN_SPLIT_STACK_64BIT
>  	case OPT_m32:
> -	  saw_opt_m32 = true;
> +	  is_m64 = false;
> +	  break;
> +
> +	case OPT_m64:
> +	  is_m64 = true;
>  	  break;
>  #endif
>  
> @@ -253,7 +259,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
>  #endif
>  
>  #ifdef TARGET_CAN_SPLIT_STACK_64BIT
> -  if (!saw_opt_m32)
> +  if (is_m64)
>      supports_split_stack = 1;
>  #endif

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

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-11 14:43                                 ` Andreas Schwab
@ 2015-10-11 18:29                                   ` Ian Lance Taylor
  2015-10-11 23:19                                     ` Alan Modra
  0 siblings, 1 reply; 36+ messages in thread
From: Ian Lance Taylor @ 2015-10-11 18:29 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Alan Modra, David Edelsohn, Lynn A. Boger, Matthias Klose, gcc-patches

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?

Ian

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-11 18:29                                   ` Ian Lance Taylor
@ 2015-10-11 23:19                                     ` Alan Modra
  0 siblings, 0 replies; 36+ messages in thread
From: Alan Modra @ 2015-10-11 23:19 UTC (permalink / raw)
  To: Ian Lance Taylor
  Cc: Andreas Schwab, David Edelsohn, Lynn A. Boger, Matthias Klose,
	gcc-patches

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

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-11 13:07                               ` Alan Modra
  2015-10-11 14:43                                 ` Andreas Schwab
@ 2015-10-12 15:15                                 ` Lynn A. Boger
  2015-10-12 22:53                                   ` Alan Modra
  2015-10-15 18:40                                 ` David Edelsohn
  2015-10-17  0:37                                 ` Ian Lance Taylor
  3 siblings, 1 reply; 36+ messages in thread
From: Lynn A. Boger @ 2015-10-12 15:15 UTC (permalink / raw)
  To: Alan Modra, Ian Lance Taylor, David Edelsohn
  Cc: Andreas Schwab, Matthias Klose, gcc-patches

Thanks for doing this Alan.  I agree this looks better to me.

I assume by "etc" you mean you did biarch builds for your bootstraps on BE?

On 10/11/2015 08:07 AM, Alan Modra wrote:
> On Sat, Oct 10, 2015 at 11:25:38PM +0200, Andreas Schwab wrote:
>> "Lynn A. Boger" <laboger@linux.vnet.ibm.com> writes:
>>
>>> Index: gcc/config/rs6000/sysv4.h
>>> ===================================================================
>>> --- gcc/config/rs6000/sysv4.h	(revision 228653)
>>> +++ gcc/config/rs6000/sysv4.h	(working copy)
>>> @@ -940,13 +940,15 @@ ncrtn.o%s"
>>>   #undef TARGET_ASAN_SHADOW_OFFSET
>>>   #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
>>>   
>>> -/* On ppc64 and ppc64le, split stack is only support for
>>> -   64 bit. */
>>> +/* On ppc64 and ppc64le, split stack is only supported for
>>> +   64 bit targets with a 64 bit compiler. */
>>>   #undef TARGET_CAN_SPLIT_STACK_64BIT
>>> +#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__)
>> This doesn't make sense.  A target header cannot use host defines.
> Right.  Here's a better fix.  A powerpc-linux biarch compiler can
> default to either -m32 or -m64 so we need to take that into account,
> and notice both -m32 and -m64 on the gccgo command line.  It's also
> possible to build a -m64 only compiler, so in that case we can define
> TARGET_CAN_SPLIT_STACK.
>
> Bootstrapped etc. powerpc64-linux, powerpc-linux and
> powerpc64le-linux.  OK?
>
> gcc/
> 	* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
> 	* config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
> 	(TARGET_CAN_SPLIT_STACK_64BIT): Define.
> gcc/go/
> 	* gospec.c (saw_opt_m32): Rename to..
> 	(is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
> 	Update uses.
> 	(lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.
>
> diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
> index 7b2f9bd..f48af43 100644
> --- a/gcc/config/rs6000/sysv4.h
> +++ b/gcc/config/rs6000/sysv4.h
> @@ -940,14 +940,6 @@ ncrtn.o%s"
>   #undef TARGET_ASAN_SHADOW_OFFSET
>   #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
>
> -/* On ppc64 and ppc64le, split stack is only support for
> -   64 bit. */
> -#undef TARGET_CAN_SPLIT_STACK_64BIT
> -#if TARGET_GLIBC_MAJOR > 2 \
> -  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)
> -#define TARGET_CAN_SPLIT_STACK_64BIT
> -#endif
> -
>   /* This target uses the sysv4.opt file.  */
>   #define TARGET_USES_SYSV4_OPT 1
>
> diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
> index 9599735..28c83e41 100644
> --- a/gcc/config/rs6000/linux64.h
> +++ b/gcc/config/rs6000/linux64.h
> @@ -245,6 +245,21 @@ extern int dot_symbols;
>   #define MULTILIB_DEFAULTS { "m32" }
>   #endif
>
> +/* Split stack is only supported for 64 bit, and requires glibc >= 2.18.  */
> +#if TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018
> +# ifndef RS6000_BI_ARCH
> +#  define TARGET_CAN_SPLIT_STACK
> +# else
> +#  if DEFAULT_ARCH64_P
> +/* Supported, and the default is -m64  */
> +#   define TARGET_CAN_SPLIT_STACK_64BIT 1
> +#  else
> +/* Supported, and the default is -m32  */
> +#   define TARGET_CAN_SPLIT_STACK_64BIT 0
> +#  endif
> +# endif
> +#endif
> +
>   #ifndef RS6000_BI_ARCH
>
>   /* 64-bit PowerPC Linux always has a TOC.  */
> diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c
> index ca3c2d7..fbb55be 100644
> --- a/gcc/go/gospec.c
> +++ b/gcc/go/gospec.c
> @@ -120,8 +120,10 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
>     /* Whether the -S option was used.  */
>     bool saw_opt_S = false;
>
> -  /* Whether the -m32 option was used. */
> -  bool saw_opt_m32 ATTRIBUTE_UNUSED = false;
> +#ifdef TARGET_CAN_SPLIT_STACK_64BIT
> +  /* Whether the -m64 option is in force. */
> +  bool is_m64 = TARGET_CAN_SPLIT_STACK_64BIT;
> +#endif
>
>     /* The first input file with an extension of .go.  */
>     const char *first_go_file = NULL;
> @@ -160,7 +162,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
>
>   #ifdef TARGET_CAN_SPLIT_STACK_64BIT
>   	case OPT_m32:
> -	  saw_opt_m32 = true;
> +	  is_m64 = false;
> +	  break;
> +
> +	case OPT_m64:
> +	  is_m64 = true;
>   	  break;
>   #endif
>
> @@ -253,7 +259,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
>   #endif
>
>   #ifdef TARGET_CAN_SPLIT_STACK_64BIT
> -  if (!saw_opt_m32)
> +  if (is_m64)
>       supports_split_stack = 1;
>   #endif
>
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-12 15:15                                 ` Lynn A. Boger
@ 2015-10-12 22:53                                   ` Alan Modra
  2015-10-13 11:27                                     ` Matthias Klose
  0 siblings, 1 reply; 36+ messages in thread
From: Alan Modra @ 2015-10-12 22:53 UTC (permalink / raw)
  To: Lynn A. Boger
  Cc: Ian Lance Taylor, David Edelsohn, Andreas Schwab, Matthias Klose,
	gcc-patches

On Mon, Oct 12, 2015 at 10:15:04AM -0500, Lynn A. Boger wrote:
> Thanks for doing this Alan.  I agree this looks better to me.
> 
> I assume by "etc" you mean you did biarch builds for your bootstraps on BE?

By "etc" I meant "and regression tested".

I built four configurations, powerpc-linux 32-bit only,
powerpc64le-linux 64-bit only, biarch powerpc-linux with 32-bit
default, and biarch powerpc64-linux with 64-bit default.

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-12 22:53                                   ` Alan Modra
@ 2015-10-13 11:27                                     ` Matthias Klose
  0 siblings, 0 replies; 36+ messages in thread
From: Matthias Klose @ 2015-10-13 11:27 UTC (permalink / raw)
  To: Alan Modra, Lynn A. Boger
  Cc: Ian Lance Taylor, David Edelsohn, Andreas Schwab, gcc-patches

On 13.10.2015 00:53, Alan Modra wrote:
> On Mon, Oct 12, 2015 at 10:15:04AM -0500, Lynn A. Boger wrote:
>> Thanks for doing this Alan.  I agree this looks better to me.
>>
>> I assume by "etc" you mean you did biarch builds for your bootstraps on BE?
>
> By "etc" I meant "and regression tested".
>
> I built four configurations, powerpc-linux 32-bit only,
> powerpc64le-linux 64-bit only, biarch powerpc-linux with 32-bit
> default, and biarch powerpc64-linux with 64-bit default.

thanks, that works for me as well (biarch powerpc-linux-gnu).

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-11 13:07                               ` Alan Modra
  2015-10-11 14:43                                 ` Andreas Schwab
  2015-10-12 15:15                                 ` Lynn A. Boger
@ 2015-10-15 18:40                                 ` David Edelsohn
  2015-10-15 19:57                                   ` Lynn A. Boger
  2015-10-17  0:37                                 ` Ian Lance Taylor
  3 siblings, 1 reply; 36+ messages in thread
From: David Edelsohn @ 2015-10-15 18:40 UTC (permalink / raw)
  To: Alan Modra
  Cc: Ian Lance Taylor, Lynn A. Boger, Andreas Schwab, Matthias Klose,
	gcc-patches

On Sun, Oct 11, 2015 at 9:07 AM, Alan Modra <amodra@gmail.com> wrote:
> On Sat, Oct 10, 2015 at 11:25:38PM +0200, Andreas Schwab wrote:
>> "Lynn A. Boger" <laboger@linux.vnet.ibm.com> writes:
>>
>> > Index: gcc/config/rs6000/sysv4.h
>> > ===================================================================
>> > --- gcc/config/rs6000/sysv4.h       (revision 228653)
>> > +++ gcc/config/rs6000/sysv4.h       (working copy)
>> > @@ -940,13 +940,15 @@ ncrtn.o%s"
>> >  #undef TARGET_ASAN_SHADOW_OFFSET
>> >  #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
>> >
>> > -/* On ppc64 and ppc64le, split stack is only support for
>> > -   64 bit. */
>> > +/* On ppc64 and ppc64le, split stack is only supported for
>> > +   64 bit targets with a 64 bit compiler. */
>> >  #undef TARGET_CAN_SPLIT_STACK_64BIT
>> > +#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__)
>>
>> This doesn't make sense.  A target header cannot use host defines.
>
> Right.  Here's a better fix.  A powerpc-linux biarch compiler can
> default to either -m32 or -m64 so we need to take that into account,
> and notice both -m32 and -m64 on the gccgo command line.  It's also
> possible to build a -m64 only compiler, so in that case we can define
> TARGET_CAN_SPLIT_STACK.
>
> Bootstrapped etc. powerpc64-linux, powerpc-linux and
> powerpc64le-linux.  OK?
>
> gcc/
>         * config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
>         * config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
>         (TARGET_CAN_SPLIT_STACK_64BIT): Define.
> gcc/go/
>         * gospec.c (saw_opt_m32): Rename to..
>         (is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
>         Update uses.
>         (lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.

The rs6000 bits are okay with me, although I never saw a full test for
all configurations from Lynn.

Thanks, David

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-15 18:40                                 ` David Edelsohn
@ 2015-10-15 19:57                                   ` Lynn A. Boger
  0 siblings, 0 replies; 36+ messages in thread
From: Lynn A. Boger @ 2015-10-15 19:57 UTC (permalink / raw)
  To: David Edelsohn, Alan Modra
  Cc: Ian Lance Taylor, Andreas Schwab, Matthias Klose, gcc-patches

Alan said he did this, which was a bootstrap and regression test of
all the combinations:

/I built four configurations, powerpc-linux 32-bit only, 
powerpc64le-linux 64-bit only, biarch powerpc-linux with 32-bit default, 
and biarch powerpc64-linux with 64-bit default/

I also did verify that on the ppc64le build and the biarch ppc64 64-bit
default that the gold linker and split stack were enabled as expected and
ran the Go testsuite for those.

On 10/15/2015 01:40 PM, David Edelsohn wrote:
> On Sun, Oct 11, 2015 at 9:07 AM, Alan Modra <amodra@gmail.com> wrote:
>> On Sat, Oct 10, 2015 at 11:25:38PM +0200, Andreas Schwab wrote:
>>> "Lynn A. Boger" <laboger@linux.vnet.ibm.com> writes:
>>>
>>>> Index: gcc/config/rs6000/sysv4.h
>>>> ===================================================================
>>>> --- gcc/config/rs6000/sysv4.h       (revision 228653)
>>>> +++ gcc/config/rs6000/sysv4.h       (working copy)
>>>> @@ -940,13 +940,15 @@ ncrtn.o%s"
>>>>   #undef TARGET_ASAN_SHADOW_OFFSET
>>>>   #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
>>>>
>>>> -/* On ppc64 and ppc64le, split stack is only support for
>>>> -   64 bit. */
>>>> +/* On ppc64 and ppc64le, split stack is only supported for
>>>> +   64 bit targets with a 64 bit compiler. */
>>>>   #undef TARGET_CAN_SPLIT_STACK_64BIT
>>>> +#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__)
>>> This doesn't make sense.  A target header cannot use host defines.
>> Right.  Here's a better fix.  A powerpc-linux biarch compiler can
>> default to either -m32 or -m64 so we need to take that into account,
>> and notice both -m32 and -m64 on the gccgo command line.  It's also
>> possible to build a -m64 only compiler, so in that case we can define
>> TARGET_CAN_SPLIT_STACK.
>>
>> Bootstrapped etc. powerpc64-linux, powerpc-linux and
>> powerpc64le-linux.  OK?
>>
>> gcc/
>>          * config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
>>          * config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
>>          (TARGET_CAN_SPLIT_STACK_64BIT): Define.
>> gcc/go/
>>          * gospec.c (saw_opt_m32): Rename to..
>>          (is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
>>          Update uses.
>>          (lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.
> The rs6000 bits are okay with me, although I never saw a full test for
> all configurations from Lynn.
>
> Thanks, David
>
>

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

* Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack
  2015-10-11 13:07                               ` Alan Modra
                                                   ` (2 preceding siblings ...)
  2015-10-15 18:40                                 ` David Edelsohn
@ 2015-10-17  0:37                                 ` Ian Lance Taylor
  3 siblings, 0 replies; 36+ messages in thread
From: Ian Lance Taylor @ 2015-10-17  0:37 UTC (permalink / raw)
  To: Alan Modra
  Cc: David Edelsohn, Lynn A. Boger, Andreas Schwab, Matthias Klose,
	gcc-patches

On Sun, Oct 11, 2015 at 6:07 AM, Alan Modra <amodra@gmail.com> wrote:
>
> gcc/
>         * config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
>         * config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
>         (TARGET_CAN_SPLIT_STACK_64BIT): Define.
> gcc/go/
>         * gospec.c (saw_opt_m32): Rename to..
>         (is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
>         Update uses.
>         (lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.

This is OK.

Thanks.

Ian

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

end of thread, other threads:[~2015-10-17  0:25 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-18 21:14 [PATCH] PR66870 PowerPC64 Enable gold linker with split stack Lynn A. Boger
2015-08-19 19:37 ` Matthias Klose
2015-08-19 19:42   ` David Edelsohn
2015-08-19 22:07   ` Lynn A. Boger
2015-08-20  0:01   ` Lynn A. Boger
2015-08-27 21:37     ` Lynn A. Boger
2015-09-15 16:50       ` Ian Lance Taylor
2015-09-15 18:21       ` David Edelsohn
2015-09-15 18:31         ` Lynn A. Boger
2015-09-15 20:04           ` Ian Lance Taylor
2015-09-17 19:15             ` Lynn A. Boger
2015-09-18 12:59               ` David Edelsohn
2015-09-30 12:46                 ` Lynn A. Boger
     [not found]               ` <CAOyqgcVA_zhivM0+qRFk9bDT42Sot-HX95M1NtZjLVphZy_0vg@mail.gmail.com>
2015-10-03 18:31                 ` Matthias Klose
     [not found]                   ` <56153C00.2000209@linux.vnet.ibm.com>
2015-10-07 17:04                     ` Ian Lance Taylor
2015-10-07 17:25                       ` David Edelsohn
2015-10-07 17:31                     ` Matthias Klose
     [not found]                       ` <5615746C.3030509@linux.vnet.ibm.com>
2015-10-07 21:58                         ` David Edelsohn
2015-10-08 18:56                       ` Lynn A. Boger
2015-10-08 20:46                         ` Matthias Klose
2015-10-09 20:17                           ` Lynn A. Boger
2015-10-10 14:00                             ` David Edelsohn
2015-10-10 21:03                               ` Matthias Klose
2015-10-10 21:25                             ` Andreas Schwab
2015-10-11 13:07                               ` Alan Modra
2015-10-11 14:43                                 ` Andreas Schwab
2015-10-11 18:29                                   ` Ian Lance Taylor
2015-10-11 23:19                                     ` Alan Modra
2015-10-12 15:15                                 ` Lynn A. Boger
2015-10-12 22:53                                   ` Alan Modra
2015-10-13 11:27                                     ` Matthias Klose
2015-10-15 18:40                                 ` David Edelsohn
2015-10-15 19:57                                   ` Lynn A. Boger
2015-10-17  0:37                                 ` Ian Lance Taylor
2015-08-25 23:05 ` Ian Lance Taylor
2015-08-26 14:01   ` Lynn A. Boger

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).