summaryrefslogtreecommitdiff
path: root/nss/coreconf/Darwin.mk
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-01-04 14:24:24 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-01-04 14:24:24 +0000
commitdc1565216a5d20ae0d75872151523252309a1292 (patch)
treed57454ba9a40386552179eddf60d28bd1e8f3d54 /nss/coreconf/Darwin.mk
parent26c046fbc57d53136b4fb3b5e0d18298318125d4 (diff)
downloadnss-dc1565216a5d20ae0d75872151523252309a1292.tar.gz
nss-3.28.1nss-3.28.1
Diffstat (limited to 'nss/coreconf/Darwin.mk')
-rw-r--r--nss/coreconf/Darwin.mk22
1 files changed, 17 insertions, 5 deletions
diff --git a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
index 9c99228..2107847 100644
--- a/nss/coreconf/Darwin.mk
+++ b/nss/coreconf/Darwin.mk
@@ -3,15 +3,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+CC ?= gcc
+CCC ?= g++
+RANLIB ?= ranlib
+
include $(CORE_DEPTH)/coreconf/UNIX.mk
include $(CORE_DEPTH)/coreconf/Werror.mk
DEFAULT_COMPILER = gcc
-CC = gcc
-CCC = g++
-RANLIB = ranlib
-
ifndef CPU_ARCH
# When cross-compiling, CPU_ARCH should already be defined as the target
# architecture, set to powerpc or i386.
@@ -21,10 +21,12 @@ endif
ifeq (,$(filter-out i%86,$(CPU_ARCH)))
ifdef USE_64
CC += -arch x86_64
+CCC += -arch x86_64
override CPU_ARCH = x86_64
else
OS_REL_CFLAGS = -Di386
CC += -arch i386
+CCC += -arch i386
override CPU_ARCH = x86
endif
else
@@ -33,6 +35,7 @@ ifeq (arm,$(CPU_ARCH))
else
OS_REL_CFLAGS = -Dppc
CC += -arch ppc
+CCC += -arch ppc
endif
endif
@@ -82,7 +85,7 @@ endif
# definitions so that the linker can catch multiply-defined symbols.
# Also, common symbols are not allowed with Darwin dynamic libraries.
-OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(WARNING_CFLAGS) -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK $(DARWIN_SDK_CFLAGS)
+OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK $(DARWIN_SDK_CFLAGS)
ifdef BUILD_OPT
ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
@@ -107,6 +110,12 @@ DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
# May override this with -bundle to create a loadable module.
DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
+ifdef USE_GCOV
+ OS_CFLAGS += --coverage
+ LDFLAGS += --coverage
+ DSO_LDOPTS += --coverage
+endif
+
MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
DLL_SUFFIX = dylib
ifdef MAPFILE
@@ -136,3 +145,6 @@ ifeq (3,$(SYS_SQLITE3_VERSION_MAJOR))
NSS_USE_SYSTEM_SQLITE = 1
endif
endif
+
+include $(CORE_DEPTH)/coreconf/sanitizers.mk
+DARWIN_SDK_SHLIBFLAGS += $(SANITIZER_LDFLAGS)