Commit 534dbc73 authored by Kai Backman's avatar Kai Backman

arm: fix build, regenerate syscall files

R=r
CC=golang-dev
https://golang.org/cl/1952046
parent 46427089
...@@ -143,12 +143,10 @@ nacl_386) ...@@ -143,12 +143,10 @@ nacl_386)
mkerrors="./mkerrors_nacl.sh $NACLRUN/include/sys/errno.h" mkerrors="./mkerrors_nacl.sh $NACLRUN/include/sys/errno.h"
;; ;;
linux_arm) linux_arm)
ARM="/home/kaib/public/linux-2.6.28" mkerrors="$mkerrors"
mksyscall="./mksyscall.sh -l32" mksyscall="./mksyscall.sh -l32"
mksysnum="./mksysnum_linux.sh $ARM/arch/arm/include/asm/unistd.h" mksysnum="./mksysnum_linux.sh /usr/include/asm/unistd.h"
# mktypes="godefs -gsyscall -carm-gcc -f-I$ARM/arch/arm/include -f-I$ARM/include -f-D__deprecated='' -f-I$ARM/arch/arm/mach-at91/include -f-DCONFIG_ARCH_AT91SAM9260 " mktypes="godefs -gsyscall"
mktypes="godefs -gsyscall -carm-gcc"
mkerrors='GORUN="qemu-arm -cpu cortex-a8" ./mkerrors.sh'
;; ;;
windows_386) windows_386)
mksyscall="./mksyscall_windows.sh -l32" mksyscall="./mksyscall_windows.sh -l32"
......
...@@ -11,14 +11,7 @@ unset LANG ...@@ -11,14 +11,7 @@ unset LANG
export LC_ALL=C export LC_ALL=C
export LC_CTYPE=C export LC_CTYPE=C
case "$GOARCH" in GCC=gcc
arm)
GCC=arm-gcc
;;
*)
GCC=gcc
;;
esac
uname=$(uname) uname=$(uname)
......
...@@ -4,15 +4,6 @@ ...@@ -4,15 +4,6 @@
package syscall package syscall
// These seem not to be defined in our gcc's ARM headers
// and are thus missing from zerrors_linux_arm.go.
const (
WSTOPPED = 0x7f
O_CLOEXEC = 0
EPOLLRDHUP = EPOLLHUP
EPOLLONESHOT = 0x40000000
)
func Getpagesize() int { return 4096 } func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
...@@ -41,6 +32,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) { ...@@ -41,6 +32,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) //sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int)
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int) //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int)
//sys sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno int) //sys sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno int)
//sys socketpair(domain int, typ int, flags int, fd *[2]int) (errno int)
//sys Chown(path string, uid int, gid int) (errno int) //sys Chown(path string, uid int, gid int) (errno int)
//sys Fchown(fd int, uid int, gid int) (errno int) //sys Fchown(fd int, uid int, gid int) (errno int)
......
This diff is collapsed.
...@@ -628,14 +628,6 @@ func socket(domain int, typ int, proto int) (fd int, errno int) { ...@@ -628,14 +628,6 @@ func socket(domain int, typ int, proto int) (fd int, errno int) {
return return
} }
func socketpair(domain int, typ int, proto int) (fd [2]int, errno int) {
var f [2]int
_, _, e1 := Syscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(&f)), 0, 0)
fd = f
errno = int(e1)
return
}
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
_, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) _, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
errno = int(e1) errno = int(e1)
...@@ -669,6 +661,12 @@ func sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno i ...@@ -669,6 +661,12 @@ func sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno i
return return
} }
func socketpair(domain int, typ int, flags int, fd *[2]int) (errno int) {
_, _, e1 := Syscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
errno = int(e1)
return
}
func Chown(path string, uid int, gid int) (errno int) { func Chown(path string, uid int, gid int) (errno int) {
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid))
errno = int(e1) errno = int(e1)
......
// godefs -gsyscall -f-m32 types_linux.c // godefs -gsyscall types_linux.c
// MACHINE GENERATED - DO NOT EDIT. // MACHINE GENERATED - DO NOT EDIT.
...@@ -14,8 +14,11 @@ const ( ...@@ -14,8 +14,11 @@ const (
PathMax = 0x1000 PathMax = 0x1000
SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet4 = 0x10
SizeofSockaddrInet6 = 0x1c SizeofSockaddrInet6 = 0x1c
SizeofSockaddrAny = 0x1c SizeofSockaddrAny = 0x70
SizeofSockaddrUnix = 0x6e SizeofSockaddrUnix = 0x6e
SizeofLinger = 0x8
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0xc
) )
// Types // Types
...@@ -113,24 +116,25 @@ type Rlimit struct { ...@@ -113,24 +116,25 @@ type Rlimit struct {
type _Gid_t uint32 type _Gid_t uint32
type Stat_t struct { type Stat_t struct {
Dev uint64 Dev uint64
__pad1 uint16 X__pad1 uint16
Pad0 [2]byte Pad0 [2]byte
__st_ino uint32 X__st_ino uint32
Mode uint32 Mode uint32
Nlink uint32 Nlink uint32
Uid uint32 Uid uint32
Gid uint32 Gid uint32
Rdev uint64 Rdev uint64
__pad2 uint16 X__pad2 uint16
Pad1 [2]byte Pad1 [6]byte
Size int64 Size int64
Blksize int32 Blksize int32
Blocks int64 Pad2 [4]byte
Atim Timespec Blocks int64
Mtim Timespec Atim Timespec
Ctim Timespec Mtim Timespec
Ino uint64 Ctim Timespec
Ino uint64
} }
type Statfs_t struct { type Statfs_t struct {
...@@ -145,6 +149,7 @@ type Statfs_t struct { ...@@ -145,6 +149,7 @@ type Statfs_t struct {
Namelen int32 Namelen int32
Frsize int32 Frsize int32
Spare [5]int32 Spare [5]int32
Pad0 [4]byte
} }
type Dirent struct { type Dirent struct {
...@@ -152,8 +157,8 @@ type Dirent struct { ...@@ -152,8 +157,8 @@ type Dirent struct {
Off int64 Off int64
Reclen uint16 Reclen uint16
Type uint8 Type uint8
Name [256]int8 Name [256]uint8
Pad0 [1]byte Pad0 [5]byte
} }
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
...@@ -178,12 +183,12 @@ type RawSockaddrUnix struct { ...@@ -178,12 +183,12 @@ type RawSockaddrUnix struct {
type RawSockaddr struct { type RawSockaddr struct {
Family uint16 Family uint16
Data [14]int8 Data [14]uint8
} }
type RawSockaddrAny struct { type RawSockaddrAny struct {
Addr RawSockaddr Addr RawSockaddr
Pad [12]int8 Pad [96]uint8
} }
type _Socklen uint32 type _Socklen uint32
...@@ -193,32 +198,29 @@ type Linger struct { ...@@ -193,32 +198,29 @@ type Linger struct {
Linger int32 Linger int32
} }
type PtraceRegs struct { type Iovec struct {
Ebx int32 Base *byte
Ecx int32 Len uint32
Edx int32
Esi int32
Edi int32
Ebp int32
Eax int32
Ds uint16
__ds uint16
Es uint16
__es uint16
Fs uint16
__fs uint16
Gs uint16
__gs uint16
Orig_eax int32
Eip int32
Cs uint16
__cs uint16
Eflags int32
Esp int32
Ss uint16
__ss uint16
} }
type Msghdr struct {
Name *byte
Namelen uint32
Iov *Iovec
Iovlen uint32
Control *byte
Controllen uint32
Flags int32
}
type Cmsghdr struct {
Len uint32
Level int32
Type int32
}
type PtraceRegs struct{}
type FdSet struct { type FdSet struct {
Bits [32]int32 Bits [32]int32
} }
...@@ -237,23 +239,23 @@ type Sysinfo_t struct { ...@@ -237,23 +239,23 @@ type Sysinfo_t struct {
Totalhigh uint32 Totalhigh uint32
Freehigh uint32 Freehigh uint32
Unit uint32 Unit uint32
_f [8]int8 X_f [8]uint8
} }
type Utsname struct { type Utsname struct {
Sysname [65]int8 Sysname [65]uint8
Nodename [65]int8 Nodename [65]uint8
Release [65]int8 Release [65]uint8
Version [65]int8 Version [65]uint8
Machine [65]int8 Machine [65]uint8
Domainname [65]int8 Domainname [65]uint8
} }
type Ustat_t struct { type Ustat_t struct {
Tfree int32 Tfree int32
Tinode uint32 Tinode uint32
Fname [6]int8 Fname [6]uint8
Fpack [6]int8 Fpack [6]uint8
} }
type EpollEvent struct { type EpollEvent struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment