Ian,

As discussed several months ago, libgo will not run on mips because it references the x86 specific system calls iopl() and ioperm(). These system calls do not exist in mips*-linux, so we move them to new 368/amd64 specific libcall_linux_*.go files.

The attached patch was tested on x86_64-linux-gnu with no libgo failures. There are still some other problems with mips*-linux, but this makes forward progress.

It is unclear what kind of change log is required, so I do not supply one.

Cavium, Inc. should now have a corporate contributor license agreement on file, so I think you can commit this upstream if acceptable.

Thanks,
David Daney

Index: go/syscall/libcall_linux_amd64.go
===================================================================
--- go/syscall/libcall_linux_amd64.go   (revision 0)
+++ go/syscall/libcall_linux_amd64.go   (revision 0)
@@ -0,0 +1,13 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// GNU/Linux library calls amd64 specific.
+
+package syscall
+
+//sys  Ioperm(from int, num int, on int) (errno int)
+//ioperm(from _C_long, num _C_long, on int) int
+
+//sys  Iopl(level int) (errno int)
+//iopl(level int) int
Index: go/syscall/libcall_linux_386.go
===================================================================
--- go/syscall/libcall_linux_386.go     (revision 0)
+++ go/syscall/libcall_linux_386.go     (revision 0)
@@ -0,0 +1,13 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// GNU/Linux library calls 386 specific.
+
+package syscall
+
+//sys  Ioperm(from int, num int, on int) (errno int)
+//ioperm(from _C_long, num _C_long, on int) int
+
+//sys  Iopl(level int) (errno int)
+//iopl(level int) int
Index: go/syscall/libcall_linux.go
===================================================================
--- go/syscall/libcall_linux.go (revision 182179)
+++ go/syscall/libcall_linux.go (working copy)
@@ -207,12 +207,6 @@ func PtraceDetach(pid int) (errno int) {
 // //sysnb     Gettid() (tid int)
 // //gettid() Pid_t
 
-//sys  Ioperm(from int, num int, on int) (errno int)
-//ioperm(from _C_long, num _C_long, on int) int
-
-//sys  Iopl(level int) (errno int)
-//iopl(level int) int
-
 // FIXME: mksysinfo linux_dirent
 //    Or just abandon this function.
 // //sys       Getdents(fd int, buf []byte) (n int, errno int)

Reply via email to