Hi Ian, > On Fri, Feb 15, 2019 at 4:03 AM Rainer Orth <r...@cebitec.uni-bielefeld.de> > wrote: >> >> Andreas Schwab <sch...@linux-m68k.org> writes: >> >> > This breaks non-split-stack builds. >> > >> > ../../../libgo/runtime/stack.c: In function 'doscanstack1': >> > ../../../libgo/runtime/stack.c:113:18: error: passing argument 1 of >> > 'scanstackblock' makes integer from pointer without a cast >> > [-Werror=int-conversion] >> > 113 | scanstackblock(bottom, (uintptr)(top - bottom), gcw); >> > | ^~~~~~ >> > | | >> > | byte * {aka unsigned char *} >> >> I see the same on Solaris. Even with that fixed by appropriate casts to >> uintptr (plus a few more times), Solaris bootstrap is still broken by >> that patch: >> >> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c: In function >> '__go_syscall6': >> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c:101:10: error: >> implicit declaration of function 'syscall' >> [-Werror=implicit-function-declaration] >> 101 | return syscall (flag, a1, a2, a3, a4, a5, a6); >> | ^~~~~~~ >> >> This needs to include <sys/syscall.h> for the syscall declaration, apart >> from the fundamental problem that syscall isn't a stable interface on >> Solaris. > > I committed this patch which should fix the Solaris build.
it did, and certainly in a cleaner way than just unconditionally including <sys/syscall.h> ;-) Thanks. > The code was already calling syscall, it was just doing it in a way > that the types didn't necessarily match the C declaration. This is > the implementation of Go's syscall.Syscall function, so there isn't > really anything else we can do. I feared as much. Some time ago when debugging another issue I saw libgo using syscall() directly, certainly unexpected in that particular case. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University