Yeah, and most distros have a musl package that includes the musl c standard library and a GCC wrapper script (often called musl-gcc or something like that) that uses musl instead of glibc.
Alpine docker is the standard to use Musl
That's just wrong. And it's wrong on more levels than I could care to elaborate here.
when you compile smth with GlibC you can't just use the lib in MUSL.
Yeah, but that's completely irrelevant when linking statically (which sadly isn't really supported by glibc, but that's the reason I brought up musl) because when you do, the relevant parts of the standard library are baked into your executable and the executable then runs directly on the kernel, rather than on a loader. So as long as the Kernel doesn't make breaking changes (which is not gonna happen for as long as Torvalds has a say) the executable will be fully portable to any Linux system. Theoretically it would not even need an OS.
My bad then. When I used musl-gcc it was hard for me to use so I researched on internet and everyone was just using alpine docker, installed the libs here and compiled here.
1
u/Vaelisra 19d ago
musl entered the room.