https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98316
Bug ID: 98316 Summary: [11 regression] cc1plus doesn't link on Solaris 11.3 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: nathan at gcc dot gnu.org Target Milestone: --- Target: *-*-solaris2.11 Even with PR c++/98315 hacked around, Solaris 11.3 (only) bootstrap is still broken: Undefined first referenced symbol in file __xnet_connect ../libcody/libcody.a(netclient.o) __xnet_socket ../libcody/libcody.a(netclient.o) __xnet_getaddrinfo ../libcody/libcody.a(netclient.o) freeaddrinfo ../libcody/libcody.a(netclient.o) gai_strerror ../libcody/libcody.a(netclient.o) ld: fatal: symbol referencing errors collect2: error: ld returned 1 exit status make[3]: *** [/vol/gcc/src/hg/master/local/gcc/cp/Make-lang.in:136: cc1plus] Error 1 Before Solaris 11.4 folded libsocket and libnsl into libc, one needed to link with both for the socket functions. The same issue exists with the other use of $(LIBCODY) in c++tools/Makefile.in. We already have 4 instances of the libsocket/libnsl check in the tree: gotools/configure.ac libcc1/configure.ac libgo/configure.ac libphobos/m4/druntime/libraries.m4 Instead of adding yet two others, we could make use of the autoconf-archive's m4/ax_lib_socket_nsl.m4 (AX_LIB_SOCKET_NSL).