a while ago I asked how to statically compiles dynamic libraries, which by the way is, in general, a very bad idea and should not be done.
However my issues persist, I need to compile a fairly complex project and make it such that it links against GLIBC 2.14 (or less).
I can't find any simple way to do it and I am wondering if any of you guys has experience with it.
At the moment, it seems to me, that the only solution is to build another toolchain with the GLIBC version that I need, but this is quite convoluted and I haven't found any simple way to do it.
Are you building on Linux? Consider using flatpak or snapcraft perhaps? That way you can build in all of your dependencies independent of system packages.
The best route I've found for this is to build in a Docker image of a sufficiently old distribution. CentOS 6 uses Glibc 2.12 for example. You can use the developer toolset repository to get modern versions of things like gcc: Developer Toolset 7 — Software Collections