On Fri, Oct 21, 2016 at 4:16 AM, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > >> 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: > ./runtime.inc:2:12: error: expected identifier or '(' before numeric constant > #define c1 3267000013 > ^ > ./runtime.inc:713:11: 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 > > runtime.inc 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.
I committed this patch which should fix this problem. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu, which admittedly proves little. Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 241430) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -9806c8a8e4e448eaf6810ff1acffa715745d2549 +6d9929a1641b180e724c2fdcdd55f6a254f1dec0 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/Makefile.am =================================================================== --- libgo/Makefile.am (revision 241427) +++ libgo/Makefile.am (working copy) @@ -1230,7 +1230,7 @@ runtime-go.lo: runtime.inc: s-runtime-inc; @true s-runtime-inc: runtime-go.lo Makefile rm -f runtime.inc.tmp2 - grep -v "#define _" runtime.inc.tmp > runtime.inc.tmp2 + grep -v "#define _" runtime.inc.tmp | grep -v "#define c0 " | grep -v "#define c1 " > runtime.inc.tmp2 for pattern in '_G[a-z]' '_P[a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \ grep "#define $$pattern" runtime.inc.tmp >> runtime.inc.tmp2; \ done