the exact version of GCC: gcc-9.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: ../gcc-9.1.0/configure CC=/opt/gcc-7.1/bin/gcc CXX=/opt/gcc-7.1/bin/g++ --enable-languages=c,c++,go --prefix=/opt/gcc-9.1 --with-cpu=v7 --with-mpc=/usr/local --with-mpfr=/usr/local --with-gmp=/usr/local --with-isl=/usr/local/ --disable-libstdcxx-pch --disable-linux-futex --disable-libsanitizer --enable-__cxa_atexit --enable-nls --enable-clocale=gnu --enable-debug --disable-doc --disable-libcilkrts --disable-libitm the complete command line that triggers the bug; /usr/local/bin/make the compiler output (error messages, warnings, etc.); [...] make[2]: Entering directory '/c/backup/fes-readynasduo/gcc-9.1.0-compiled/gotools' /backup/fes-readynasduo/gcc-9.1.0-compiled/./gcc/gccgo -B/backup/fes-readynasduo/gcc-9.1.0-compiled/./gcc/ -B/opt/gcc-9.1/sparc-unknown-linux-gnu/bin/ -B/opt/gcc-9.1/sparc-unknown-linux-gnu/lib/ -isystem /opt/gcc-9.1/sparc-unknown-linux-gnu/include -isystem /opt/gcc-9.1/sparc-unknown-linux-gnu/sys-include -g -O2 -I ../sparc-unknown-linux-gnu/libgo -static-libstdc++ -static-libgcc -L ../sparc-unknown-linux-gnu/libgo -L ../sparc-unknown-linux-gnu/libgo/.libs -o go ../../gcc-9.1.0/gotools/../libgo/go/cmd/go/alldocs.go ../../gcc-9.1.0/gotools/../libgo/go/cmd/go/go11.go ../../gcc-9.1.0/gotools/../libgo/go/cmd/go/main.go ../sparc-unknown-linux-gnu/libgo/libgotool.a ../sparc-unknown-linux-gnu/libgo/.libs/libgo.so: undefined reference to `fdopendir' ../sparc-unknown-linux-gnu/libgo/.libs/libgo.so: undefined reference to `__sync_bool_compare_and_swap_4' ../sparc-unknown-linux-gnu/libgo/.libs/libgo.so: undefined reference to `__tls_get_addr' ../sparc-unknown-linux-gnu/libgo/.libs/libgo.so: undefined reference to `__go_openat' ../sparc-unknown-linux-gnu/libgo/.libs/libgo.so: undefined reference to `fstatat64' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:821: go] Error 1 make[2]: Leaving directory '/c/backup/fes-readynasduo/gcc-9.1.0-compiled/gotools' make[1]: *** [Makefile:15520: all-gotools] Error 2 make[1]: Leaving directory '/c/backup/fes-readynasduo/gcc-9.1.0-compiled' make: *** [Makefile:993: all] Error 2 ldd -r /backup/fes-readynasduo/gcc-9.1.0-compiled/gcc/gccgo libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x2002c000) libm.so.6 => /lib/libm.so.6 (0x20124000) libc.so.6 => /lib/libc.so.6 (0x201b8000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x20000000) /backup/fes-readynasduo/gcc-9.1.0-compiled/gcc/gccgo --version gccgo (GCC) 9.1.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Not sure which information is important for this bug.
>fdopendir() is available in glibc since version 2.4. What glibc version are you using?
Created attachment 46419 [details] usr\include\bits ldd --version ldd (GNU libc) 2.3.2 Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.
Did libgo ever work on this system? I can't remember. I don't see how we can work around a missing __tls_get_addr symbol. That suggests that the system does not support Thread Local Storage.
Your system is way too old to support Go.
Are there any chances to get gccgo build on this machine by the following options? - crosscompiling - update libc
> Are there any chances to get gccgo build on this machine by the following > options? > - crosscompiling > - update libc Cross-compiling doesn't really matter here if you ultimately need to run the Go programs on the machines. You probably need to update the entire system.
Among the requirements for gccgo is support for Thread Local Storage. If your system does not support that, gccgo cannot work.
Thanks for the clarification.