https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81451
Bug ID: 81451 Summary: missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’ Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: mfe at live dot de CC: cmang at google dot com Target Milestone: --- Created attachment 41765 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41765&action=edit futex of host system the exact version of GCC: gcc-7.1.0 the system type: NetgearReadyNAS Duo (http://wiki.dietpc.org/index.php/DIET-PC_on_SPARC_ReadyNAS) the options given when GCC was configured/built: configure CC=/opt/gcc-4.6/bin/gcc CXX=/opt/gcc-4.6/bin/g++ --enable-languages=c,c++,go --prefix=/opt/gcc-7.1 --with-cpu=v7 --with-mpc=/usr/local --with-mpfr=/usr/local --with-gmp=/usr/local --with-isl=/usr/local/ --disable-libstdcxx-pch the complete command line that triggers the bug; /usr/local/bin/make the compiler output (error messages, warnings, etc.); [...] /bin/sh ./libtool --tag=CC --mode=compile /media/gcc-7.1-compiled/./gcc/xgcc -B/media/gcc-7.1-compiled/./gcc/ -B/opt/gcc-7.1/sparc-unknown-linux-gnu/bin/ -B/opt/gcc-7.1/sparc-unknown-linux-gnu/lib/ -isystem /opt/gcc-7.1/sparc-unknown-linux-gnu/include -isystem /opt/gcc-7.1/sparc-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-7.1.0/libgo -I ../../../gcc-7.1.0/libgo/runtime -I../../../gcc-7.1.0/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fnon-call-exceptions -fplan9-extensions -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I ../../../gcc-7.1.0/libgo/../libgcc -I ../../../gcc-7.1.0/libgo/../libbacktrace -I ../../gcc/include -g -O2 -MT thread-linux.lo -MD -MP -MF .deps/thread-linux.Tpo -c -o thread-linux.lo `test -f 'runtime/thread-linux.c' || echo '../../../gcc-7.1.0/libgo/'`runtime/thread-linux.c libtool: compile: /media/gcc-7.1-compiled/./gcc/xgcc -B/media/gcc-7.1-compiled/./gcc/ -B/opt/gcc-7.1/sparc-unknown-linux-gnu/bin/ -B/opt/gcc-7.1/sparc-unknown-linux-gnu/lib/ -isystem /opt/gcc-7.1/sparc-unknown-linux-gnu/include -isystem /opt/gcc-7.1/sparc-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-7.1.0/libgo -I ../../../gcc-7.1.0/libgo/runtime -I../../../gcc-7.1.0/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fnon-call-exceptions -fplan9-extensions -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I ../../../gcc-7.1.0/libgo/../libgcc -I ../../../gcc-7.1.0/libgo/../libbacktrace -I ../../gcc/include -g -O2 -MT thread-linux.lo -MD -MP -MF .deps/thread-linux.Tpo -c ../../../gcc-7.1.0/libgo/runtime/thread-linux.c -fPIC -DPIC -o .libs/thread-linux.o In file included from ../../../gcc-7.1.0/libgo/runtime/thread-linux.c:12:0: /usr/include/linux/futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’ asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, ^~~~ make[4]: *** [Makefile:1944: thread-linux.lo] Error 1 I'm not sure, but it looks like gcc is expecting a newer version of futex.h than the host system can provide? I attached the futex header of the host system which is running the Linux kernel 2.6.17.14. Maybe --disable-linux-futex would fix the issue? Is it possible to add manual the configure parameter --disable-linux-futex afterwards to the libgo dictionary without reconfiguring and recompiling the current gcc?