This is kind of dirty with that huge list of linker params, but it works and it produces smaller object files (probably because GCC is better optimized for size).
This makes sure the compiler itself can build/link an ELF file that works on an Arduino.
This is intentionally similar to the target specifications in Rust: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.TargetOptions.html