diff options
author | Tim Taubert <ttaubert@mozilla.com> | 2016-02-09 10:31:30 +0100 |
---|---|---|
committer | Tim Taubert <ttaubert@mozilla.com> | 2016-02-09 10:31:30 +0100 |
commit | 1dd6badeeeef58ac2ce627caeef8f5ec673090d2 (patch) | |
tree | b716e032fab9d0b3696da785fc3c292eec08a86e /coreconf/Werror.mk | |
parent | 699c691cf4f0eb5e32ea7370f1f9148b5c4054b4 (diff) | |
download | nss-hg-1dd6badeeeef58ac2ce627caeef8f5ec673090d2.tar.gz |
Backed out changeset f4a05e89dfad (bug 917571)
Diffstat (limited to 'coreconf/Werror.mk')
-rw-r--r-- | coreconf/Werror.mk | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/coreconf/Werror.mk b/coreconf/Werror.mk index 958a002d3..28a64059d 100644 --- a/coreconf/Werror.mk +++ b/coreconf/Werror.mk @@ -7,7 +7,6 @@ ifndef CC_IS_GCC CC_IS_GCC := $(shell $(CC) -x c -E -Wall -Werror /dev/null >/dev/null 2>&1 && echo 1) - # Export CC_IS_GCC to save a shell invocation when recursing. export CC_IS_GCC endif @@ -17,18 +16,9 @@ ifndef CC_NAME else CC_NAME := $(notdir $(CC)) endif - # Export CC_NAME to save a shell invocation when recursing. export CC_NAME endif -ifndef GCC_VERSION - ifeq (1,$(CC_IS_GCC)) - GCC_VERSION := $(subst ., ,$(shell $(CC) -dumpversion || echo x.x.x)) - # Export GCC_VERSION to save a shell invocation when recursing. - export GCC_VERSION - endif -endif - ifndef WARNING_CFLAGS ifneq (1,$(CC_IS_GCC)) WARNING_CFLAGS = $(NULL) @@ -65,17 +55,18 @@ ifndef WARNING_CFLAGS ifeq ($(CC_NAME),clang) # Clang reports its version as an older gcc, but it's OK NSS_ENABLE_WERROR = 1 - else ifeq ($(CC_NAME),gcc) - ifneq (,$(filter 4.8 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION)))) + else + CC_VERSION := $(subst ., ,$(shell $(CC) -dumpversion)) + ifneq (,$(filter 4.8 4.9,$(word 1,$(CC_VERSION)).$(word 2,$(CC_VERSION)))) NSS_ENABLE_WERROR = 1 endif - ifeq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION)))) + ifeq (,$(filter 0 1 2 3 4,$(word 1,$(CC_VERSION)))) NSS_ENABLE_WERROR = 1 endif - endif - ifndef NSS_ENABLE_WERROR - $(warning Unable to find gcc 4.8 or greater, disabling -Werror) - NSS_ENABLE_WERROR = 0 + ifndef NSS_ENABLE_WERROR + $(warning Unable to find gcc 4.8 or greater, disabling -Werror) + NSS_ENABLE_WERROR = 0 + endif endif endif endif #ndef NSS_ENABLE_WERROR |