libgo patch committed: Rewrite interface code into Go

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Fri Oct 21 11:16:00 GMT 2016

Hi Ian,

> This patch to libgo rewrites the interface code from C to Go.
> I started to copy the Go 1.7 interface code, but the gc and gccgo
> representations of interfaces are too different.  So instead I rewrote
> the gccgo interface code from C to Go.  The code is largely the same
> as it was, but the names are more like those used in the gc runtime.
> I also copied over the string comparison functions, and tweaked the
> compiler to use eqstring when comparing strings for equality.
> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
> to mainline.

this patch broke Solaris 11 and 12 bootstrap:

In file included from /vol/gcc/src/hg/trunk/local/libgo/runtime/runtime.h:113:0,
                 from /vol/gcc/src/hg/trunk/local/libgo/runtime/go-main.c:17:
./ error: expected identifier or '(' before numeric constant
 #define c1 3267000013
./ note: in expansion of macro 'c1'
  uint32_t c1;
Makefile:1630: recipe for target 'libgobegin_a-go-main.o' failed
make[4]: *** [libgobegin_a-go-main.o] Error 1 starts with

#define c0 2860486313
#define c1 3267000013

and lines 712-713 have

struct _Compartments_t {
        uint32_t c1;

which stems from <sys/tsol/label_macro.h> (Compartments_t).

It seems c[01] were introduced via the new go/runtime/alg.go.


Rainer Orth, Center for Biotechnology, Bielefeld University

More information about the Gcc-patches mailing list