Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > Ian Lance Taylor <i...@google.com> writes: > >> History shows that Go library updates sometimes break the Go build on >> non-GNU/Linux targets. I tried to be careful this time, but please let >> me know about any new problems. > > As expected, this did break Solaris bootstrap and will also break IRIX > bootstrap: > > * The Solaris 11/x86 libgo bootstrap dies like this: > > /vol/gcc/src/hg/trunk/local/libgo/syscalls/exec.go:11:14: error: imported and > not used: unsafe
That is odd since the file clearly does use unsafe. Perhaps it is somehow a consequence of the other errors. > /vol/gcc/src/hg/trunk/local/libgo/syscalls/exec.go:172:20: error: reference > to undefined name 'TIOCNOTTY' > /vol/gcc/src/hg/trunk/local/libgo/syscalls/exec.go:179:20: error: reference > to undefined name 'TIOCSCTTY' > > Don't know about the first one, but the two ioctl's are missing from > sysinfo.go. They are defined in <sys/termios.h>, but if I include > that in mksysinfo.sh, they only show up as > > // unknowndefine TIOCNOTTY (tIOC|113) > > in gen-sysinfo.go. No idea why yet. Is tIOC defined in gen-sysinfo.go? In <sys/termios.h>? Does some other header file need to be #included first? > * IRIX will be worse: while it has TIOCNOTTY, it completely lacks > TIOCSCTTY. > > Suggestions? For a missing TIOCSCTTY I think the simplest solution will be to set it in syscall_irix.go to some innocuous value if there is one. E.g., TIOCNXCL if Irix supports that. If there is no innocuous value, let's just set it to 0 and test for 0 in exec.go before calling ioctl. Similarly, if we can't get TIOCNOTTY defined in sysinfo.go, then I think it's OK to just define it directly in syscall_irix.go and syscall_solaris.go. Those values are not going to change with different versions of the OS. Thanks for looking at this. Ian