https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70519
--- Comment #6 from Jason Vas Dias <jason.vas.dias at gmail dot com> --- Yes, Jakub, thanks, I know : > If you link with g++ or xg++ instead of gcc or xgcc, then the driver is > adding > -lstdc++ automatically. But it is not ME linking, it is the gcc-5.3.0 Makefile.in / configure.ac scripts . It seems to me on cursory inspection of these huge scripts that neither of them are explicitly adding '-lstdc' anywhere onto the link lines for xg++ links, nor to LDFLAGS or ALL_LINKERFLAGS or BUILD_LDFLAGS or any link line containing LDFLAGS , as shown by this grep in the unmodified GCC 5.3.0 source directory: [root@localhost:/usr/os_src/gcc-5.3.0 [4360] 16:23:17 #:8!:4399] $ egrep '(LINKER|LD)FLAGS' Makefile.in Makefile.def Makefile.tpl gcc/Makefile.in | egrep -i stdc\\+\\+\|stdc\[xp\]+ [root@localhost:/usr/os_src/gcc-5.3.0 $ ie. no references to 'stdc++' or stdcxx (case insensitive) in any line containing LDFLAGS or LINKER in any make script . So it is very difficult to find the exact line of code that is meant to be adding the '-lstdc++' and somehow failed to do so in my case ! Is it meant to be added to LDFLAGS during the stage2 gcc configure using xg++ as the compiler ($CC) ? A search of the huge configure.ac scripts yields no results : $ egrep '(LINKER|LD)FLAGS' configure.ac gcc/configure.ac | egrep -i stdc\\+\\+\|stdc\[xp]+ configure.ac: LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" $ So how are the build scripts meant to be adding '-lstdc++' to the link lines of executables produced by the stage2 xg++ ? This is far from clear.