[RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Thu Apr 7 19:15:00 GMT 2011


Ian,

> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
>> I've got a similar issue on IRIX 6.5: <sys/time.h> has
>>
>> struct timeval {
>> #if _MIPS_SZLONG == 64
>> 	__int32_t :32;
>> #endif
>> 	time_t	tv_sec;		/* seconds */
>> 	long	tv_usec;	/* and microseconds */
>> };
>>
>> which causes the 64-bit libgo build to break.
>
> I don't immediately see why that would break anything.  For a case like
> this I would expect layout_decl to turn the first field into an ordinary
> non-bit-field anyhow.

Here's the error I run into:

/vol/gcc/src/hg/trunk/irix/libgo/go/os/file.go:432:12: error: incompatible types in assignment (implicit assignment of 'syscall.Timeval' hidden field '_f0')
/vol/gcc/src/hg/trunk/irix/libgo/go/os/file.go:433:12: error: incompatible types in assignment (implicit assignment of 'syscall.Timeval' hidden field '_f0')
/vol/gcc/src/hg/trunk/irix/libgo/go/os/file.go:434:37: error: argument 2 has incompatible type (implicit assignment of 'syscall.Timeval' hidden field '_f0')
make[8]: *** [os/os.lo] Error 1

> What does the line for timeval look like in gen-sysinfo.go?

I get

type Timeval struct { _f0 int32; Sec Timeval_sec_t; Usec Timeval_usec_t; }

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list