This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Go patch committed: Update libgo to Go release r60
Ian Lance Taylor <iant@google.com> writes:
>> * 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.
Perhaps, we'll see.
>> /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
Only as
// unknowndefine tIOC ('t'<<8)
> header file need to be #included first?
No, <sys/termios.h> is self-contained.
>> * 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
Yep, IRIX has that.
> 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.
That certainly works as a fallback, but I'd rather avoid the hardcoding
if it can be reasonably avoided.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University