fix #658 use target names directly instead of LOCATION
fix #667 flags list used as string
enable function and data sections
fix incorrect library search paths
fix for llvm trunk