gcc will do what you need.

I suggest you learn about virtualization environments such as qemu. They can greatly simplify the process of experimenting with OS-level functionality without jeopardizing your machine.