fix #667 flags list used as string
enable function and data sections
fix incorrect library search paths
fix for llvm trunk