public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup
@ 2011-03-30 20:48 Uros Bizjak
  2011-03-31  8:41 ` Rainer Orth
  2011-04-01 23:10 ` Ian Lance Taylor
  0 siblings, 2 replies; 22+ messages in thread
From: Uros Bizjak @ 2011-03-30 20:48 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

On Wed, Mar 30, 2011 at 9:58 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> Attached ports go to ALPHA architecture.
>
> There are however several problems with the build:
>
> a) Bootstrap compare failure in the gcc/go directory due to binutils
> bug [1], fixed in latest binutils SVN, use --disable-bootstrap
>
> b) alpha doesn't define "struct user_regs_struct" from which "type
> PtraceRegs" is derived. I have manually created PtraceRegs from
> pt_regs structure and patched generated libgo/sysinfo.go in build
> directory after the build broke. However - the comment from sys/user.h
> says that this file is for GDB and GDB only...
>
> c) some weird issue with double definition of "const _SOCK_NONBLOCK"
> in gen-sysinfo.go and consequently sysinfo.go.

d) The definition of "type Stat_t struct" also includes additional
struct and this confuses compilation.

Attached is a fixup of sysinfo.go that is neded for successful build.
Apply this fixup after build breaks and restart build.

Uros.

[-- Attachment #2: sysinfo.go.diff --]
[-- Type: application/octet-stream, Size: 2293 bytes --]

--- sysinfo.go	2011-03-30 22:02:20.000000000 +0200
+++ sysinfo.go.fixed	2011-03-30 21:33:55.000000000 +0200
@@ -810,7 +810,6 @@
 const _SO_TIMESTAMPING = 37
 const _SCM_TIMESTAMPING = _SO_TIMESTAMPING
 const _SO_RXQ_OVFL = 40
-const _SOCK_NONBLOCK = 0x40000000
 const _IN_CLASSA_NET = 0xff000000
 const _IN_CLASSA_NSHIFT = 24
 const _IN_CLASSA_HOST = (0xffffffff & ^_IN_CLASSA_NET)
@@ -3748,7 +3747,6 @@
 const SOCK_DCCP = _SOCK_DCCP
 const SOCK_PACKET = _SOCK_PACKET
 const SOCK_CLOEXEC = _SOCK_CLOEXEC
-const SOCK_NONBLOCK = _SOCK_NONBLOCK
 const IPPROTO_IP = _IPPROTO_IP
 const IPPROTO_HOPOPTS = _IPPROTO_HOPOPTS
 const IPPROTO_ICMP = _IPPROTO_ICMP
@@ -3834,6 +3832,7 @@
 const PTRACE_EVENT_EXEC = _PTRACE_EVENT_EXEC
 const PTRACE_EVENT_VFORK_DONE = _PTRACE_EVENT_VFORK_DONE
 const PTRACE_EVENT_EXIT = _PTRACE_EVENT_EXIT
+type PtraceRegs struct { R0 uint64; R1 uint64; R2 uint64; R3 uint64; R4 uint64; R5 uint64; R6 uint64; R7 uint64; R8 uint64; R19 uint64; R20 uint64; R21 uint64; R22 uint64; R23 uint64; R24 uint64; R25 uint64; R26 uint64; R27 uint64; R28 uint64; Hae uint64; Trap_a0 uint64; Trap_a1 uint64; Trap_a2 uint64; Ps uint64; Pc uint64; Gp uint64; R16 uint64; R17 uint64; R18 uint64; }
 type Size_t _size_t
 type Ssize_t _ssize_t
 type Offset_t _off64_t
@@ -3849,7 +3848,7 @@
 type Timespec_sec_t int64
 type Timespec_nsec_t int64
 type Timespec struct { Sec Timespec_sec_t; Nsec Timespec_nsec_t; }
-type Stat_t struct { Dev uint64; Ino uint64; Rdev uint64; Size int64; Blocks uint64; Mode uint32; Uid uint32; Gid uint32; Blksize uint32; Nlink uint32; __pad0 int32; _f0 struct { Atime Timespec; }; _f1 struct { Mtime Timespec; }; _f2 struct { Ctime Timespec; }; __unused [2+1]int64; }
+type Stat_t struct { Dev uint64; Ino uint64; Rdev uint64; Size int64; Blocks uint64; Mode uint32; Uid uint32; Gid uint32; Blksize uint32; Nlink uint32; __pad0 int32; Atime Timespec; Mtime Timespec; Ctime Timespec; __unused [2+1]int64; }
 type Dirent struct { Ino uint64; Off int64; Reclen uint16; Type uint8; Name [255+1]byte; }
 type DIR _DIR
 type Rusage struct { Utime Timeval; Stime Timeval; Maxrss int64; Ixrss int64; Idrss int64; Isrss int64; Minflt int64; Majflt int64; Nswap int64; Inblock int64; Oublock int64; Msgsnd int64; Msgrcv int64; Nsignals int64; Nvcsw int64; Nivcsw int64; }

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-07-06 17:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 20:48 [RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup Uros Bizjak
2011-03-31  8:41 ` Rainer Orth
2011-04-01 23:17   ` Ian Lance Taylor
2011-04-03 18:02     ` Uros Bizjak
2011-04-07 19:15     ` Rainer Orth
2011-04-22  1:31       ` Ian Lance Taylor
2011-05-02  8:28         ` Uros Bizjak
2011-05-02 14:43           ` Ian Lance Taylor
2011-05-31 19:17           ` Ian Lance Taylor
2011-05-31 19:18           ` Ian Lance Taylor
2011-06-01  7:43             ` Uros Bizjak
2011-06-01 14:37               ` Ian Lance Taylor
2011-06-01 17:03                 ` Mike Stump
2011-06-01 17:49                   ` Ian Lance Taylor
2011-07-05 17:03                     ` Uros Bizjak
2011-07-05 17:19                       ` Mike Stump
2011-07-05 17:47                         ` Uros Bizjak
2011-07-06 17:12                         ` Uros Bizjak
2011-07-06 17:43                           ` Ian Lance Taylor
2011-07-06 17:58                             ` Uros Bizjak
2011-07-05 20:13                       ` Ian Lance Taylor
2011-04-01 23:10 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).