Fixed makefile to work for various different gcc versions on OSX (from Craig Berry)

This commit is contained in:
Mark Pizzolato 2012-04-17 08:45:52 -07:00
parent eb60957366
commit 2873be2d7a

View file

@ -80,6 +80,10 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
ifeq (Darwin,$(OSTYPE))
OSNAME = OSX
LIBEXT = dylib
# OSX's XCode gcc doesn't support LTO, but gcc built to explicitly enable it will work
ifeq (,$(shell $(GCC) -v /dev/null 2>&1 | grep '--enable-lto'))
LTO_EXCLUDE_VERSIONS += $(GCC_VERSION)
endif
else
ifeq (Linux,$(OSTYPE))
LIBPATH := $(sort $(foreach lib,$(shell /sbin/ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib))))