diff mbox

libgo patch committed: Fixes for sparc64

Message ID CAOyqgcXBxyGZ8OCqZL26bR8uM6yfOkdSR-ev_+rrjrXQcUVfjQ@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor Oct. 13, 2016, 4:20 a.m. UTC
On Wed, Oct 12, 2016 at 8:03 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Wed, Oct 12, 2016 at 10:43 AM, Ian Lance Taylor <iant@golang.org> wrote:
>> On Wed, Oct 12, 2016 at 7:28 AM, Ian Lance Taylor <iant@golang.org> wrote:
>>> This patch to libgo by James Clarke fixes libgo for sparc64.  The
>>> getrandom syscall was being ignored because the file was named
>>> "sparc".  The clone syscall apparently needs special attention on
>>> SPARC.  Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
>>> Committed to mainline.
>>
>> And a followup: mark the new rawClone function as no_split_stack.
>> Bootstrapped and tested on x86_64-pc-linux-gnu, committed to mainline.
>
> This breaks the build on Ubuntu 1604 on aarch64-linux-gnu:
>
> ../../../gcc/libgo/go/syscall/clone_linux.c:14:28: warning: ‘struct
> pt_regs’ declared inside parameter list will not be visible outside of
> this definition or declaration
>
>          void *ctid, struct pt_regs *regs)
>
>                             ^~~~~~~
>
> ../../../gcc/libgo/go/syscall/clone_linux.c:19:82: warning: ‘struct
> pt_regs’ declared inside parameter list will not be visible outside of
> this definition or declaration  rawClone (unsigned long flags, void
> *child_stack, void *ptid, void *ctid, struct pt_regs *regs)
>
>
>            ^~~~~~~
>
> ../../../gcc/libgo/go/syscall/clone_linux.c:19:1: error: conflicting
> types for ‘rawClone’
>
>  rawClone (unsigned long flags, void *child_stack, void *ptid, void
> *ctid, struct pt_regs *regs)  ^~~~~~~~
>
> ../../../gcc/libgo/go/syscall/clone_linux.c:13:6: note: previous
> declaration of ‘rawClone’ was here  long rawClone (unsigned long
> flags, void *child_stack, void *ptid,
>
>       ^~~~~~~~

Bother.  Fixed like so.  Committed to mainline.

Ian

Comments

Andrew Pinski Oct. 13, 2016, 4:57 a.m. UTC | #1
On Wed, Oct 12, 2016 at 9:20 PM, Ian Lance Taylor <iant@golang.org> wrote:
> On Wed, Oct 12, 2016 at 8:03 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> On Wed, Oct 12, 2016 at 10:43 AM, Ian Lance Taylor <iant@golang.org> wrote:
>>> On Wed, Oct 12, 2016 at 7:28 AM, Ian Lance Taylor <iant@golang.org> wrote:
>>>> This patch to libgo by James Clarke fixes libgo for sparc64.  The
>>>> getrandom syscall was being ignored because the file was named
>>>> "sparc".  The clone syscall apparently needs special attention on
>>>> SPARC.  Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
>>>> Committed to mainline.
>>>
>>> And a followup: mark the new rawClone function as no_split_stack.
>>> Bootstrapped and tested on x86_64-pc-linux-gnu, committed to mainline.
>>
>> This breaks the build on Ubuntu 1604 on aarch64-linux-gnu:
>>
>> ../../../gcc/libgo/go/syscall/clone_linux.c:14:28: warning: ‘struct
>> pt_regs’ declared inside parameter list will not be visible outside of
>> this definition or declaration
>>
>>          void *ctid, struct pt_regs *regs)
>>
>>                             ^~~~~~~
>>
>> ../../../gcc/libgo/go/syscall/clone_linux.c:19:82: warning: ‘struct
>> pt_regs’ declared inside parameter list will not be visible outside of
>> this definition or declaration  rawClone (unsigned long flags, void
>> *child_stack, void *ptid, void *ctid, struct pt_regs *regs)
>>
>>
>>            ^~~~~~~
>>
>> ../../../gcc/libgo/go/syscall/clone_linux.c:19:1: error: conflicting
>> types for ‘rawClone’
>>
>>  rawClone (unsigned long flags, void *child_stack, void *ptid, void
>> *ctid, struct pt_regs *regs)  ^~~~~~~~
>>
>> ../../../gcc/libgo/go/syscall/clone_linux.c:13:6: note: previous
>> declaration of ‘rawClone’ was here  long rawClone (unsigned long
>> flags, void *child_stack, void *ptid,
>>
>>       ^~~~~~~~
>
> Bother.  Fixed like so.  Committed to mainline.

Thanks that solved it.

>
> Ian
diff mbox

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 241074)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-f38ba8837a0c961e18d982930e192132870f3836
+6c9070324d5b7c8483bc7c17b0a8faaa1fb1ae30
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/syscall/clone_linux.c
===================================================================
--- libgo/go/syscall/clone_linux.c	(revision 241072)
+++ libgo/go/syscall/clone_linux.c	(working copy)
@@ -5,18 +5,17 @@ 
    license that can be found in the LICENSE file.  */
 
 #include <errno.h>
-#include <asm/ptrace.h>
 #include <sys/syscall.h>
 
 #include "runtime.h"
 
 long rawClone (unsigned long flags, void *child_stack, void *ptid,
-	       void *ctid, struct pt_regs *regs)
+	       void *ctid, void *regs)
   __asm__ (GOSYM_PREFIX "syscall.rawClone")
   __attribute__ ((no_split_stack));
 
 long
-rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, struct pt_regs *regs)
+rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, void *regs)
 {
 #if defined(__arc__) || defined(__aarch64__) || defined(__arm__) || defined(__mips__) || defined(__hppa__) || defined(__powerpc__) || defined(__score__) || defined(__i386__) || defined(__xtensa__)
   // CLONE_BACKWARDS