changeset 2995:b965a723122e

PR1095: Allow -Werror to be turned off.
author andrew
date Wed, 22 Aug 2012 16:25:23 +0100
parents 4a73d25caf23
children 04c3fb903cf3
files make/linux/makefiles/adlc.make make/linux/makefiles/gcc.make make/solaris/makefiles/adlc.make make/solaris/makefiles/gcc.make
diffstat 4 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/makefiles/adlc.make	Wed May 22 18:20:20 2013 +0100
+++ b/make/linux/makefiles/adlc.make	Wed Aug 22 16:25:23 2012 +0100
@@ -61,7 +61,9 @@
 
 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
 # Compiler warnings are treated as errors
+ifneq ($(COMPILER_WARNINGS_FATAL),false)
 CFLAGS_WARN = -Werror
+endif
 CFLAGS += $(CFLAGS_WARN)
 
 OBJECTNAMES = \
--- a/make/linux/makefiles/gcc.make	Wed May 22 18:20:20 2013 +0100
+++ b/make/linux/makefiles/gcc.make	Wed Aug 22 16:25:23 2012 +0100
@@ -143,7 +143,9 @@
 endif
 
 # Compiler warnings are treated as errors
+ifneq ($(COMPILER_WARNINGS_FATAL),false)
 WARNINGS_ARE_ERRORS = -Werror
+endif
 
 # Except for a few acceptable ones
 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
--- a/make/solaris/makefiles/adlc.make	Wed May 22 18:20:20 2013 +0100
+++ b/make/solaris/makefiles/adlc.make	Wed Aug 22 16:25:23 2012 +0100
@@ -68,8 +68,10 @@
 
 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
 # Compiler warnings are treated as errors
-ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
-  CFLAGS_WARN = +w -errwarn
+ifneq ($(COMPILER_WARNINGS_FATAL),false)
+  ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+    CFLAGS_WARN = +w -errwarn
+  endif
 endif
 CFLAGS += $(CFLAGS_WARN)
 
--- a/make/solaris/makefiles/gcc.make	Wed May 22 18:20:20 2013 +0100
+++ b/make/solaris/makefiles/gcc.make	Wed Aug 22 16:25:23 2012 +0100
@@ -113,7 +113,9 @@
 
 
 # Compiler warnings are treated as errors 
-WARNINGS_ARE_ERRORS = -Werror 
+ifneq ($(COMPILER_WARNINGS_FATAL),false)
+WARNINGS_ARE_ERRORS = -Werror
+endif
 # Enable these warnings. See 'info gcc' about details on these options
 ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare 
 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS)