larmel / lacc

A simple, self-hosting C compiler
MIT License
887 stars 64 forks source link

Add -MD, -MT, -static, and -[no]pie flag recognition to the driver. #17

Closed ibara closed 5 years ago

ibara commented 5 years ago

This PR adds some extra flag recognition to the driver that the OpenBSD build system expects. It doesn't actually do anything with -MD or -MT but -static and -[no]pie are required linker flags for OpenBSD builds. Unfortunately, OpenBSD calls the option to disable PIE linking -nopie whereas Linux names it -no-pie. I'm not sure how to reconcile that difference; I tried -[no[-]]pie but that didn't seem to work.