I had this problem, and the solution was to explicitly pass libstdc++.a to gcc, like the following:
/usr/local/gcc-10.2.0/bin/g++ -I/usr/local/gcc-10.2.0/include