Make sure link flags occur only in linking step.
Support dashes in directory names.

By using a double dash '--' in the filename instead of a single '-', we can now
encode directory names containing a dash, such as "compiler-rt".
Add patch to fix build on Mac OS.