'how to link to specify glibc

I have a cmake project that need to be linked with glibc-2.33. As system glibc is low version and install new glibc to system is not recommended, I build and install glibc-2.33 following with #2 in http://web.yl.is.s.u-tokyo.ac.jp/~tosh/kml/how_to_build_and_use_glibc.html into a custom path. but I'm not sure how to add cmake sentence so that I can link the project with glibc-2.33 (should be linker and all libraries). Maybe someone can give me some advice. Thanks



Solution 1:[1]

but I'm not sure how to add cmake sentence so that I can link the project with glibc-2.33 (should be linker and all libraries).

The example you referenced doesn't require you to link against the new GLIBC, and instead uses "explicit loader invocation" -- /path/to/ld.so /path/to/binary at runtime.

If you do want to link against the new GLIBC, see this answer. Sorry I don't know how to do this with cmake.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Employed Russian