diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-04-15 15:08:14 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-04-15 15:24:38 +0200 |
commit | f62c863f97fa2e848be0c3231596301195080694 (patch) | |
tree | 65daa44bc4c5f5e655ffd2ece8273af81e8c5160 /nss | |
parent | 336b27890b10f346158491b0d5d8edc25fb476e4 (diff) |
Unbreak build with clang for Mac OS X
Diffstat (limited to 'nss')
-rw-r--r-- | nss/nss.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nss/nss.patch b/nss/nss.patch index 6930e6753ac9..fa080861ff66 100644 --- a/nss/nss.patch +++ b/nss/nss.patch @@ -189,3 +189,23 @@ endif CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk) +--- misc/nss-3.12.8/mozilla/security/coreconf/Darwin.mk ++++ misc/build/nss-3.12.8/mozilla/security/coreconf/Darwin.mk +@@ -64,12 +64,16 @@ + endif + + ifneq (,$(MACOS_SDK_DIR)) ++ CLANG_VERSION_FULL := $(shell $(CC) -v 2>&1 | grep "clang version" | sed -e "s/^.*clang version[ ]*//" | awk '{ print $$1 }') + GCC_VERSION_FULL := $(shell $(CC) -v 2>&1 | grep "gcc version" | sed -e "s/^.*gcc version[ ]*//" | awk '{ print $$1 }') + GCC_VERSION_MAJOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$1 }') + GCC_VERSION_MINOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$2 }') + GCC_VERSION = $(GCC_VERSION_MAJOR).$(GCC_VERSION_MINOR) ++ ifneq (,$(CLANG_VERSION_FULL)) ++ DARWIN_SDK_CFLAGS = -isysroot $(MACOS_SDK_DIR) ++ DARWIN_SDK_SHLIBFLAGS = -isysroot $(MACOS_SDK_DIR) + +- ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR))) ++ else ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR))) + # GCC <= 3 + DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks + ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0)) |