summaryrefslogtreecommitdiff
path: root/coreconf
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2016-01-04 17:29:17 +1100
committerMartin Thomson <martin.thomson@gmail.com>2016-01-04 17:29:17 +1100
commit3ab039b9777b6f03a8e4fbeb7bb5de2bb218456d (patch)
tree6945ccd8b08a744c5966f4fe9deed5ef06af9256 /coreconf
parent26b65616b0b3fddab3a042faa503a46f8e02c36b (diff)
downloadnss-hg-3ab039b9777b6f03a8e4fbeb7bb5de2bb218456d.tar.gz
Bug 1226179 - Using -Werror on all unix platforms, r=gaston
Diffstat (limited to 'coreconf')
-rw-r--r--coreconf/Darwin.mk2
-rw-r--r--coreconf/Linux.mk3
-rw-r--r--coreconf/UNIX.mk2
-rw-r--r--coreconf/WIN32.mk6
-rw-r--r--coreconf/Werror.mk2
-rw-r--r--coreconf/command.mk4
6 files changed, 10 insertions, 9 deletions
diff --git a/coreconf/Darwin.mk b/coreconf/Darwin.mk
index 9c992289f..7e11e3afb 100644
--- a/coreconf/Darwin.mk
+++ b/coreconf/Darwin.mk
@@ -82,7 +82,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))
diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk
index 7a2411876..b61a261d6 100644
--- a/coreconf/Linux.mk
+++ b/coreconf/Linux.mk
@@ -4,7 +4,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(CORE_DEPTH)/coreconf/UNIX.mk
-include $(CORE_DEPTH)/coreconf/Werror.mk
#
# The default implementation strategy for Linux is now pthreads
@@ -140,7 +139,7 @@ ifeq ($(USE_PTHREADS),1)
OS_PTHREAD = -lpthread
endif
-OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) $(WARNING_CFLAGS) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR
+OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR
OS_LIBS = $(OS_PTHREAD) -ldl -lc
ifdef USE_PTHREADS
diff --git a/coreconf/UNIX.mk b/coreconf/UNIX.mk
index 84b881f7c..b448e7553 100644
--- a/coreconf/UNIX.mk
+++ b/coreconf/UNIX.mk
@@ -62,3 +62,5 @@ endif
define MAKE_OBJDIR
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
endef
+
+include $(CORE_DEPTH)/coreconf/Werror.mk
diff --git a/coreconf/WIN32.mk b/coreconf/WIN32.mk
index 7ca4c8c80..dfe2119a0 100644
--- a/coreconf/WIN32.mk
+++ b/coreconf/WIN32.mk
@@ -123,14 +123,14 @@ ifdef NS_USE_GCC
DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME)
endif
else # !NS_USE_GCC
- OS_CFLAGS += -W3 -nologo -D_CRT_SECURE_NO_WARNINGS \
- -D_CRT_NONSTDC_NO_WARNINGS
+ WARNING_CFLAGS = -W3 -nologo -D_CRT_SECURE_NO_WARNINGS \
+ -D_CRT_NONSTDC_NO_WARNINGS
OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
ifndef NSS_ENABLE_WERROR
NSS_ENABLE_WERROR = 1
endif
ifeq ($(NSS_ENABLE_WERROR),1)
- OS_CFLAGS += -WX
+ WARNING_CFLAGS += -WX
endif
ifeq ($(_MSC_VER),$(_MSC_VER_6))
ifndef MOZ_DEBUG_SYMBOLS
diff --git a/coreconf/Werror.mk b/coreconf/Werror.mk
index b5ef62551..f1f8dc9ec 100644
--- a/coreconf/Werror.mk
+++ b/coreconf/Werror.mk
@@ -3,7 +3,7 @@
# 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/.
-# This sets warning flags for unix-like operating systems.
+# This sets WARNING_CFLAGS for unix-like operating systems.
ifndef CC_NAME
CC_NAME := $(shell $(CC) -? 2>&1 >/dev/null | sed -e 's/:.*//;1q')
diff --git a/coreconf/command.mk b/coreconf/command.mk
index ec1fd4d36..4682a7e19 100644
--- a/coreconf/command.mk
+++ b/coreconf/command.mk
@@ -12,8 +12,8 @@ AS = $(CC)
ASFLAGS += $(CFLAGS)
CCF = $(CC) $(CFLAGS)
LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS) $(XLDFLAGS)
-CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
- $(XCFLAGS)
+CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(WARNING_CFLAGS) $(XP_DEFINE) \
+ $(DEFINES) $(INCLUDES) $(XCFLAGS)
PERL = perl
RANLIB = echo
TAR = /bin/tar