summaryrefslogtreecommitdiffstats
path: root/arch/arc/Makefile
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2016-03-18 13:58:01 +0530
committerVineet Gupta <vgupta@synopsys.com>2016-03-18 16:22:36 +0530
commita69fe1a2c9b2bd35046cb8f4e61337825cef9239 (patch)
treeddc1955039d71a002a5f727ab798fdc3012548fb /arch/arc/Makefile
parent667a490bdb6e27db0887d2ca515b907d6aa87118 (diff)
downloadop-kernel-dev-a69fe1a2c9b2bd35046cb8f4e61337825cef9239.zip
op-kernel-dev-a69fe1a2c9b2bd35046cb8f4e61337825cef9239.tar.gz
ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8
linux-next has been reporting gazillion warnings for ARC build and I finally decided to take a bite: http://kisskb.ellerman.id.au/kisskb/buildresult/12638735/ Most of the them are due to -Wmaybe-uninitialized | ../kernel/sysctl.c: In function '__do_proc_doulongvec_minmax': | ../kernel/sysctl.c:1928:12: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized] | ret = tmp - *buf; | ^ | ../kernel/sysctl.c:2342:29: note: 'p' was declared here | char *kbuf = NULL, *p; | ^ | ... | ... Cursory look at code seemed fine and a definite gcc false positive in say kernel/sysctl.c Mystery was why only for ARC (and not with ARM linaro toolchain based off same gcc 4.8). Turns out that -O3 (default for ARC) triggers these and if I enable -O3 for ARM kernel build, I see the same splat. I initially wanted to disable this only for gcc 4.8, but Arnd reported it is seen even on gcc 6.0 for ARM with -O3. Thus better to disable this independent of gcc version. Cc: Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/Makefile')
-rw-r--r--arch/arc/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index fed12f3..def69e3 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -76,7 +76,9 @@ endif
ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
# Generic build system uses -O2, we want -O3
# Note: No need to add to cflags-y as that happens anyways
-ARCH_CFLAGS += -O3
+#
+# Disable the false maybe-uninitialized warings gcc spits out at -O3
+ARCH_CFLAGS += -O3 $(call cc-disable-warning,maybe-uninitialized,)
endif
# small data is default for elf32 tool-chain. If not usable, disable it
OpenPOWER on IntegriCloud