What is the lowest version of glibc I can use to build gcc 4.8.3 and libstdc++?

조안나 opehn0@gmail.com
Thu Oct 5 02:52:37 GMT 2023


Situation:
I am attempting to migrate legacy C programs to C++11
For use in older distributions, I static link libstdc++ through the
-static-libstdc++ option
C++11 is supported after version 4.8.3 of gcc, So I built it on CentOS7
where gcc 4.8.5 installed.

Result showed a dependence on glibc and was only available in distributions
with glibc14 and later versions installed.
The required version felt a little high because many customers use old
distribution.
I came up with the idea of building libstdc++ myself using a lower version
of glibc to reduce dependency.

First I tried using glibc 2.5 for gcc 4.8.3
Same, I built it on CentOS7 where gcc 4.8.5 and glibc 2.17 installed.
But failed with the error below:
configure: error: unsupported system, cannot find sizeof (omp_lock_t)

I think I lowered the glibc too much, but I couldn't find a document about
compatibility between gcc or libstdc++ and glibc.
What is the lowest version of glibc I can use to build gcc 4.8.3 and
libstdc++?
Can somebody help?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20231005/79c56a46/attachment.htm>


More information about the Libstdc++ mailing list