Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The vm still worked because most system utilities are written in a language like C. For which there are system calls available which can be used. The only things that would really break are shell scripts that call /bin/rm. And the days of init managers written in shell are long gone ;).
In Gentoo you don't really have to do it yourself. Portage (the package handler) is basically a system of scripts taking care of that. So instead of fetching a binary package, it fetches sources and knows how to compile them for you. You don't need to know the internals of compiling, but you do need to understand the command line, environment and that kind of stuff.