libstdc++ is a part of the C++ compiler (gcc or llvm). You need not only the current libstdc++ but also the compiler that goes with it. The current version of each compiler (which is needed for support C++17) requires the current version of libstdc++ for programs that are compiled with it. I haven't double-checked the binutils dependencies, but the newer compilers will likely require a newer version of binutils (and, specifically, the ld
linker). The advanced features of the new C++ standards likely required new functionality implemented in the system linker. Not to mention the new compiler functionality as well (link-time optimizations in the curren version of gcc, for example, require closely tied support from the linker, ld
, or gold
, which will actually invoke the compiler again during the link phase).
Your only realistic solution is to bootstrap a secondary toolchain, starting with binutils, and then finally with the current version of your compiler. You do not have have to update or replace your system-installed libstdc++, or compiler, or ld. By running their respective configuration scripts it's possible to install the entire toolchain in a separate directory hierarchy so that they will not interfere with your system-installed binutils and compiler.
As far as other system dependencies go, you probably need to rebuild only the C++ ones. System dependencies that are C libraries are unlikely to need a rebuild. Still, if you have some, you will have to rebuild them, that's just the way it is, there are no alternative shortcuts.
That's pretty much it. There are no other alternatives. As you can surmise, bootstrapping an entire toolchain in order to "side-load it" onto a system with an existing compiler toolchain, in a manner as to not interfere with it, is not a small endeavour. It's a challenge even for skilled, experienced developers or system administrators. But this is certainly doable, I've done this a few years ago, in a previous job. It was possible to do that, so I see no reason why it's not possible to do it now; and this is pretty much the only feasible way to be able to support a modern version of C++ on a distribution that comes with an older compiler tolchain (that does not support the current C++ standard).