Compile a Hello World example in C with musl and tcc
2020-03-29 | #c #linux #musl #tcc #void
Continuing my exploration of suckless tools I wanted to try compiling a program with tcc and musl. tcc stands for Tiny C Compiler, and musl is a lightweight libc alternative to glibc. I was generally sold on the principal of these tools, but I could not for the life of me find documentation on how to get these two working together.
Turns out it is rather quite trivial if you use the right OS. In my case, I was doing this on Void Linux running inside of a QEMU vm. The reason I chose Void, was because it has a musl build, so all of the tools are built with musl instead of glibc. musl-devel is not available on the glibc version.