diff options
author | Mikio Hara <mikioh.mikioh@gmail.com> | 2014-02-07 10:22:13 +0900 |
---|---|---|
committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2014-02-07 10:22:13 +0900 |
commit | c3e5828fe4641cb65b647e9c82877a7bdb3602eb (patch) | |
tree | e17128b686961c110a37247176c71fe2b0432c92 /src/pkg | |
parent | f5b3a9c6cf18bae0a12fbc03b7198eda10cdb0c6 (diff) | |
download | go-c3e5828fe4641cb65b647e9c82877a7bdb3602eb.tar.gz |
runtime: fix build on freebsd/arm
This CL is in preparation to make cgo work on freebsd/arm.
How to generate defs-files on freebsd/arm in the bootstrapping phase:
1. run freebsd on appropriate arm-eabi platforms
2. both syscall z-files and runtime def-files in the current tree are
broken about EABI padding, fix them by hand
3. run make.bash again to build $GOTOOLDIR/cgo
4. use $GOTOOLDIR/cgo directly
LGTM=minux.ma, iant
R=iant, minux.ma, dave
CC=golang-codereviews
https://codereview.appspot.com/59580045
Diffstat (limited to 'src/pkg')
-rw-r--r-- | src/pkg/runtime/defs_freebsd_arm.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/pkg/runtime/defs_freebsd_arm.h b/src/pkg/runtime/defs_freebsd_arm.h index d321f4249..e868ca313 100644 --- a/src/pkg/runtime/defs_freebsd_arm.h +++ b/src/pkg/runtime/defs_freebsd_arm.h @@ -4,7 +4,7 @@ enum { EINTR = 0x4, - EFAULT = 0xe, + EFAULT = 0xe, PROT_NONE = 0x0, PROT_READ = 0x1, @@ -76,13 +76,13 @@ enum { ITIMER_VIRTUAL = 0x1, ITIMER_PROF = 0x2, - EV_ADD = 0x1, - EV_DELETE = 0x2, - EV_CLEAR = 0x20, - EV_RECEIPT = 0x40, - EV_ERROR = 0x4000, - EVFILT_READ = -0x1, - EVFILT_WRITE = -0x2, + EV_ADD = 0x1, + EV_DELETE = 0x2, + EV_CLEAR = 0x20, + EV_RECEIPT = 0x40, + EV_ERROR = 0x4000, + EVFILT_READ = -0x1, + EVFILT_WRITE = -0x2, }; typedef struct Rtprio Rtprio; @@ -159,10 +159,12 @@ struct Ucontext { struct Timespec { int64 tv_sec; int32 tv_nsec; + byte Pad_cgo_0[4]; }; struct Timeval { int64 tv_sec; int32 tv_usec; + byte Pad_cgo_0[4]; }; struct Itimerval { Timeval it_interval; @@ -170,12 +172,12 @@ struct Itimerval { }; struct Kevent { - uint32 ident; - int16 filter; - uint16 flags; - uint32 fflags; - int32 data; - byte *udata; + uint32 ident; + int16 filter; + uint16 flags; + uint32 fflags; + int32 data; + byte *udata; }; |