fix int to void* cast on x64
generalize arch setup
generate response files for use by linker

Object dir path can under circumstances cause that the expanded
command line exceeds the length allowed by the OS. Linker can read
the object lists from a file which eliminates this issue.
use response files for exts and sapi linking
trim when adding flags, avoid multiple spaces
C89 compat
fix test cleanup