From 08d60882d72e50498536b7d02f4b8838db8d81c4 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 20 Nov 2017 18:26:29 -0800 Subject: scons: Get rid of a flag which makes Werror optional. This flag wasn't being used. Also move the Werror code to the SConstruct now that it's being applied universally. Change-Id: I18b00d4b41bc1add9271ca299c020c14970a6926 Reviewed-on: https://gem5-review.googlesource.com/5982 Reviewed-by: Andreas Sandberg Reviewed-by: Nikos Nikoleris Maintainer: Andreas Sandberg --- SConstruct | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 36db2162c..09c3476d7 100755 --- a/SConstruct +++ b/SConstruct @@ -359,6 +359,13 @@ if main['GCC'] or main['CLANG']: shared_partial_flags = ['-r', '-nostdlib'] main.Append(PSHLINKFLAGS=shared_partial_flags) main.Append(PLINKFLAGS=shared_partial_flags) + + # Treat warnings as errors but white list some warnings that we + # want to allow (e.g., deprecation warnings). + main.Append(CCFLAGS=['-Werror', + '-Wno-error=deprecated-declarations', + '-Wno-error=deprecated', + ]) else: print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal, print "Don't know what compiler options to use for your compiler." -- cgit v1.2.3