diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-09 16:59:38 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-09 16:59:38 +0000 |
commit | 7d87883aa475403a899dce8ecc6f333b8c58ea6e (patch) | |
tree | 4f89aac562b08da9309687e5d72502505488af4a /libgo | |
parent | b05980c7ab3ff3f96ebd5531777095ac2496516b (diff) |
Backport correct Go MIPS architecture names from trunk.
Brings in the following patches:
https://golang.org/cl/46150
https://golang.org/cl/46151
https://golang.org/cl/46152
https://golang.org/cl/46153
https://golang.org/cl/46154
https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01777.html
* go.test/go-test.exp (go-set-goarch): Update MIPS architecture names.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/config.h.in | 3 | ||||
-rwxr-xr-x | libgo/configure | 28 | ||||
-rw-r--r-- | libgo/configure.ac | 23 | ||||
-rw-r--r-- | libgo/go/cmd/cgo/main.go | 80 | ||||
-rw-r--r-- | libgo/go/go/build/syslist.go | 2 | ||||
-rw-r--r-- | libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go (renamed from libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go) | 2 | ||||
-rw-r--r-- | libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go | 2 | ||||
-rw-r--r-- | libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go | 11 | ||||
-rw-r--r-- | libgo/go/runtime/hash32.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/hash64.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/lfstack_32bit.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/lfstack_64bit.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/unaligned2.go | 2 | ||||
-rw-r--r-- | libgo/go/syscall/endian_big.go | 2 | ||||
-rw-r--r-- | libgo/go/syscall/syscall_linux_mips64x.go | 20 | ||||
-rw-r--r-- | libgo/go/syscall/syscall_linux_mipsx.go | 20 | ||||
-rwxr-xr-x | libgo/match.sh | 4 | ||||
-rwxr-xr-x | libgo/mksysinfo.sh | 4 | ||||
-rw-r--r-- | libgo/sysinfo.c | 3 | ||||
-rwxr-xr-x | libgo/testsuite/gotest | 4 |
20 files changed, 95 insertions, 123 deletions
diff --git a/libgo/config.h.in b/libgo/config.h.in index a669ff7add16..a7b1d47ac9be 100644 --- a/libgo/config.h.in +++ b/libgo/config.h.in @@ -114,6 +114,9 @@ /* Define to 1 if you have the <linux/netlink.h> header file. */ #undef HAVE_LINUX_NETLINK_H +/* Define to 1 if you have the <linux/ptrace.h> header file. */ +#undef HAVE_LINUX_PTRACE_H + /* Define to 1 if you have the <linux/reboot.h> header file. */ #undef HAVE_LINUX_REBOOT_H diff --git a/libgo/configure b/libgo/configure index f571d97aad68..b848167d5178 100755 --- a/libgo/configure +++ b/libgo/configure @@ -13625,7 +13625,7 @@ esac # supported by the gofrontend and all architectures supported by the # gc toolchain. # N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch). -ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mipso32 mipsn32 mipso64 mipsn64 mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sparc sparc64" +ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sparc sparc64" # All known GOARCH_FAMILY values. ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SPARC SPARC64" @@ -13728,16 +13728,6 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : mips_abi="n64" else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if _MIPS_SIM != _ABIO64 -#error not o64 -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - mips_abi="o64" -else as_fn_error "unknown MIPS ABI" "$LINENO" 5 mips_abi="n32" fi @@ -13746,26 +13736,24 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "$mips_abi" in - "o32") GOARCH=mipso32 ;; - "n32") GOARCH=mipsn32 ;; - "n64") GOARCH=mipsn64 ;; - "o64") GOARCH=mipso64 ;; + "o32") GOARCH=mips ;; + "n32") GOARCH=mips64p32 ;; + "n64") GOARCH=mips64 ;; esac case "$mips_abi" in "o32" | "n32") GOARCH_FAMILY=MIPS GOARCH_MINFRAMESIZE=4 ;; - "n64" | "o64") + "n64") GOARCH_FAMILY=MIPS64 GOARCH_MINFRAMESIZE=8 ;; esac case "${host}" in - mips*el) + mips*el-*-*) + GOARCH="${GOARCH}le" ;; *) GOARCH_BIGENDIAN=1 @@ -14762,7 +14750,7 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h fi -for ac_header in port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/reboot.h netinet/icmp6.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h +for ac_header in port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/icmp6.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/libgo/configure.ac b/libgo/configure.ac index 7c49d5514e71..672bc0073bc6 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -197,7 +197,7 @@ AC_SUBST(USE_DEJAGNU) # supported by the gofrontend and all architectures supported by the # gc toolchain. # N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch). -ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mipso32 mipsn32 mipso64 mipsn64 mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sparc sparc64" +ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sparc sparc64" # All known GOARCH_FAMILY values. ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SPARC SPARC64" @@ -280,31 +280,26 @@ GOARCH_HUGEPAGESIZE="1 << 21" #error not n64 #endif], [mips_abi="n64"], - [AC_COMPILE_IFELSE([ -#if _MIPS_SIM != _ABIO64 -#error not o64 -#endif], -[mips_abi="o64"], [AC_MSG_ERROR([unknown MIPS ABI]) -[mips_abi="n32"]])])])]) +[mips_abi="n32"]])])]) case "$mips_abi" in - "o32") GOARCH=mipso32 ;; - "n32") GOARCH=mipsn32 ;; - "n64") GOARCH=mipsn64 ;; - "o64") GOARCH=mipso64 ;; + "o32") GOARCH=mips ;; + "n32") GOARCH=mips64p32 ;; + "n64") GOARCH=mips64 ;; esac case "$mips_abi" in "o32" | "n32") GOARCH_FAMILY=MIPS GOARCH_MINFRAMESIZE=4 ;; - "n64" | "o64") + "n64") GOARCH_FAMILY=MIPS64 GOARCH_MINFRAMESIZE=8 ;; esac case "${host}" in - mips*el) + mips*el-*-*) + GOARCH="${GOARCH}le" ;; *) GOARCH_BIGENDIAN=1 @@ -569,7 +564,7 @@ AC_C_BIGENDIAN GCC_CHECK_UNWIND_GETIPINFO -AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/reboot.h netinet/icmp6.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h) +AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/icmp6.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h) AC_CHECK_HEADERS([linux/filter.h linux/if_addr.h linux/if_ether.h linux/if_tun.h linux/netlink.h linux/rtnetlink.h], [], [], [#ifdef HAVE_SYS_SOCKET_H diff --git a/libgo/go/cmd/cgo/main.go b/libgo/go/cmd/cgo/main.go index c91c830260fa..ac102050dadc 100644 --- a/libgo/go/cmd/cgo/main.go +++ b/libgo/go/cmd/cgo/main.go @@ -139,51 +139,47 @@ func usage() { } var ptrSizeMap = map[string]int64{ - "386": 4, - "alpha": 8, - "amd64": 8, - "arm": 4, - "arm64": 8, - "m68k": 4, - "mipso32": 4, - "mipsn32": 4, - "mipso64": 8, - "mipsn64": 8, - "mips": 4, - "mipsle": 4, - "mips64": 8, - "mips64le": 8, - "ppc": 4, - "ppc64": 8, - "ppc64le": 8, - "s390": 4, - "s390x": 8, - "sparc": 4, - "sparc64": 8, + "386": 4, + "alpha": 8, + "amd64": 8, + "arm": 4, + "arm64": 8, + "m68k": 4, + "mips": 4, + "mipsle": 4, + "mips64": 8, + "mips64le": 8, + "mips64p32": 4, + "mips64p32le": 4, + "ppc": 4, + "ppc64": 8, + "ppc64le": 8, + "s390": 4, + "s390x": 8, + "sparc": 4, + "sparc64": 8, } var intSizeMap = map[string]int64{ - "386": 4, - "alpha": 8, - "amd64": 8, - "arm": 4, - "arm64": 8, - "m68k": 4, - "mipso32": 4, - "mipsn32": 4, - "mipso64": 8, - "mipsn64": 8, - "mips": 4, - "mipsle": 4, - "mips64": 8, - "mips64le": 8, - "ppc": 4, - "ppc64": 8, - "ppc64le": 8, - "s390": 4, - "s390x": 8, - "sparc": 4, - "sparc64": 8, + "386": 4, + "alpha": 8, + "amd64": 8, + "arm": 4, + "arm64": 8, + "m68k": 4, + "mips": 4, + "mipsle": 4, + "mips64": 8, + "mips64le": 8, + "mips64p32": 8, + "mips64p32le": 8, + "ppc": 4, + "ppc64": 8, + "ppc64le": 8, + "s390": 4, + "s390x": 8, + "sparc": 4, + "sparc64": 8, } var cPrefix string diff --git a/libgo/go/go/build/syslist.go b/libgo/go/go/build/syslist.go index ea316ea61a28..39603f46ed1d 100644 --- a/libgo/go/go/build/syslist.go +++ b/libgo/go/go/build/syslist.go @@ -5,4 +5,4 @@ package build const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows zos " -const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le mipso32 mipsn32 mipsn64 mipso64 ppc s390 s390x sparc sparc64 " +const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sparc sparc64 " diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go b/libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go index 8f481fa58ddc..4d8f6c53a992 100644 --- a/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go +++ b/libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build mipsn32 +// +build mips64p32 mips64p32le package unix diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go b/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go index 02fd1a064230..b328b8f1f0e5 100644 --- a/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go +++ b/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build mips64 mips64le mipsn64 mipso64 +// +build mips64 mips64le package unix diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go b/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go deleted file mode 100644 index 612d00b4af15..000000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2016 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. - -// +build mipso32 - -package unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 4353 diff --git a/libgo/go/runtime/hash32.go b/libgo/go/runtime/hash32.go index cfb3a58c7c87..dd2e657fe3f7 100644 --- a/libgo/go/runtime/hash32.go +++ b/libgo/go/runtime/hash32.go @@ -6,7 +6,7 @@ // xxhash: https://code.google.com/p/xxhash/ // cityhash: https://code.google.com/p/cityhash/ -// +build 386 arm armbe m68k mipso32 mipsn32 mips mipsle ppc s390 sparc +// +build 386 arm armbe m68k mips mipsle ppc s390 sparc package runtime diff --git a/libgo/go/runtime/hash64.go b/libgo/go/runtime/hash64.go index 551d5b5f8d83..f7d4a6f2f2a2 100644 --- a/libgo/go/runtime/hash64.go +++ b/libgo/go/runtime/hash64.go @@ -6,7 +6,7 @@ // xxhash: https://code.google.com/p/xxhash/ // cityhash: https://code.google.com/p/cityhash/ -// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le s390x alpha arm64be ia64 mipso64 mipsn64 mips64p32 mips64p32le sparc64 +// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le s390x alpha arm64be ia64 mips64p32 mips64p32le sparc64 package runtime diff --git a/libgo/go/runtime/lfstack_32bit.go b/libgo/go/runtime/lfstack_32bit.go index bc53b13c414f..ab0edab68f50 100644 --- a/libgo/go/runtime/lfstack_32bit.go +++ b/libgo/go/runtime/lfstack_32bit.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build 386 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le mipso32 mipsn32 ppc s390 sparc +// +build 386 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le ppc s390 sparc package runtime diff --git a/libgo/go/runtime/lfstack_64bit.go b/libgo/go/runtime/lfstack_64bit.go index 213efb107068..00541613bdaf 100644 --- a/libgo/go/runtime/lfstack_64bit.go +++ b/libgo/go/runtime/lfstack_64bit.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64 arm64 mips64 mips64le ppc64 ppc64le s390x arm64be alpha mipsn64 sparc64 +// +build amd64 arm64 mips64 mips64le ppc64 ppc64le s390x arm64be alpha sparc64 package runtime diff --git a/libgo/go/runtime/unaligned2.go b/libgo/go/runtime/unaligned2.go index b8aefb952236..a33c87acd56a 100644 --- a/libgo/go/runtime/unaligned2.go +++ b/libgo/go/runtime/unaligned2.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build arm mips mipsle mips64 mips64le armbe m68k mipso32 mipsn32 sparc alpha ia64 mipso64 mipsn64 mips64p32 mips64p32le sparc64 +// +build arm mips mipsle mips64 mips64le armbe m68k sparc alpha ia64 mips64p32 mips64p32le sparc64 package runtime diff --git a/libgo/go/syscall/endian_big.go b/libgo/go/syscall/endian_big.go index b96594ec280e..f8ee7cfc233f 100644 --- a/libgo/go/syscall/endian_big.go +++ b/libgo/go/syscall/endian_big.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // -// +build ppc64 s390x mips mips64 armbe arm64be m68k ppc mipso32 mipsn32 mipso64 mipsn64 mips64p32 s390 sparc sparc64 +// +build ppc64 s390x mips mips64 armbe arm64be m68k ppc mips64p32 s390 sparc sparc64 package syscall diff --git a/libgo/go/syscall/syscall_linux_mips64x.go b/libgo/go/syscall/syscall_linux_mips64x.go deleted file mode 100644 index c1d51b1e26d7..000000000000 --- a/libgo/go/syscall/syscall_linux_mips64x.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 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. - -// +build linux -// +build mips64 mips64le - -package syscall - -func (r *PtraceRegs) PC() uint64 { return r.Regs[64] } - -func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc } - -func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { - return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) -} - -func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { - return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) -} diff --git a/libgo/go/syscall/syscall_linux_mipsx.go b/libgo/go/syscall/syscall_linux_mipsx.go index af319ac345f3..06dd1ea2bc37 100644 --- a/libgo/go/syscall/syscall_linux_mipsx.go +++ b/libgo/go/syscall/syscall_linux_mipsx.go @@ -3,10 +3,24 @@ // license that can be found in the LICENSE file. // +build linux -// +build mips mipsle +// +build mips mipsle mips64 mips64le mips64p32 mips64p32le package syscall -func (r *PtraceRegs) PC() uint64 { return uint64(r.Regs[64]) } +import "unsafe" -func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = uint32(pc) } +func (r *PtraceRegs) PC() uint64 { + return r.Cp0_epc +} + +func (r *PtraceRegs) SetPC(pc uint64) { + r.Cp0_epc = pc +} + +func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { + return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) +} + +func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { + return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) +} diff --git a/libgo/match.sh b/libgo/match.sh index 94bcbc83c64f..ce569b7fa9a3 100755 --- a/libgo/match.sh +++ b/libgo/match.sh @@ -116,7 +116,7 @@ for f in $gofiles; do android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows) tag1=nonmatchingtag ;; - 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | mipso32 | mipsn32 | mipsn64 | mipso64 | ppc | s390 | s390x | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64) tag1=nonmatchingtag ;; esac @@ -128,7 +128,7 @@ for f in $gofiles; do android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows) tag2=nonmatchingtag ;; - 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | mipso32 | mipsn32 | mipsn64 | mipso64 | ppc | s390 | s390x | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64) tag2=nonmatchingtag ;; esac diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index ec2224db2b4e..bbc85f98ab70 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -302,9 +302,13 @@ if test "$regs" = ""; then upcase_fields "__user_psw_struct" "PtracePsw" >> ${OUT} || true upcase_fields "__user_fpregs_struct" "PtraceFpregs" >> ${OUT} || true upcase_fields "__user_per_struct" "PtracePer" >> ${OUT} || true + else + # mips* + regs=`grep '^type _pt_regs struct' gen-sysinfo.go || true` fi fi if test "$regs" != ""; then + regs=`echo $regs | sed -e 's/type _pt_regs struct//'` regs=`echo $regs | sed -e 's/type __*user_regs_struct struct //' -e 's/[{}]//g'` regs=`echo $regs | sed -e s'/^ *//'` diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c index 235941b62115..a1afc7d119c5 100644 --- a/libgo/sysinfo.c +++ b/libgo/sysinfo.c @@ -102,6 +102,9 @@ #if defined(HAVE_LINUX_NETLINK_H) #include <linux/netlink.h> #endif +#if defined(HAVE_LINUX_PTRACE_H) +#include <linux/ptrace.h> +#endif #if defined(HAVE_LINUX_RTNETLINK_H) #include <linux/rtnetlink.h> #endif diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index f070a8ae69e8..d389b1048926 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -314,7 +314,7 @@ x) android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows) tag1=nonmatchingtag ;; - 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | mipso32 | mipsn32 | mipsn64 | mipso64 | ppc | s390 | s390x | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64) tag1=nonmatchingtag ;; esac @@ -326,7 +326,7 @@ x) android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows) tag2=nonmatchingtag ;; - 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | mipso32 | mipsn32 | mipsn64 | mipso64 | ppc | s390 | s390x | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64) tag2=nonmatchingtag ;; esac |