I have a C/C++ project that is built using CMake. While trying to compile a static binary, I've run into issues with different GLIBC
versions on my computer and the target machine. In a different question on SO, the accepted answer to a similar problem is to use an alternative implementation of the libc, like musl
or uClibc
. (See here)
I can't find any information on how to point cmake
to using such an alternative libc. Neither is a FindMusl.cmake
file shipped, nor can I find one on the internet. Simply using CC=/usr/bin/musl-gcc
does not work.
How can I link my cmake project statically against such alternative libc implementations, making it independent from GLIBC?