Implement flexible target specification

See commit message.
Seems like x86_64 linker doesn't understand this option, but i686 does.