moved LDFLAGS to near end of gcc command, before output specification