LDFLAGS should only be used at link time.
detect clang, and disable gcc specific warnings