How to compile to flat binary?

I’m not sure if anything has changed, but I remember this thread with regards to RISC-V binaries.