7fd62f93ee5a67e5e774d45caba90dabc6b80b1c
[openwrt/openwrt.git] / toolchain / llvm / patches / 110-darwin_version_detect.patch
1 --- a/Makefile.rules
2 +++ b/Makefile.rules
3 @@ -506,11 +506,13 @@ endif
4 #--------------------------------------------------------------------
5
6 ifeq ($(HOST_OS),Darwin)
7 + ifndef DARWIN_VERSION
8 DARWIN_VERSION := `sw_vers -productVersion`
9 # Strip a number like 10.4.7 to 10.4
10 DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]).*/\1/')
11 # Get "4" out of 10.4 for later pieces in the makefile.
12 DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/')
13 + endif
14
15 SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress \
16 -dynamiclib