]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix build on freebsd/arm
authorMikio Hara <mikioh.mikioh@gmail.com>
Fri, 7 Feb 2014 01:22:13 +0000 (10:22 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Fri, 7 Feb 2014 01:22:13 +0000 (10:22 +0900)
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://golang.org/cl/59580045

src/pkg/runtime/defs_freebsd_arm.h

index d321f4249b83085bc5be3f8455be2a72e2be624a..e868ca313e664ffafe2275bf23a06861f81601fd 100644 (file)
@@ -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;
 };