From c2482146d1441a02f393d2ea3f3f31bd68e9c7be Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Sat, 21 Nov 2015 19:40:34 +0800 Subject: [PATCH] rk: Makefile: add gcc-wrapper Change-Id: Ie5025f30a747cd40e26eeb6ec939de28af899645 Signed-off-by: Tao Huang --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index b44aae1aed83..9de98049ee3b 100644 --- a/Makefile +++ b/Makefile @@ -465,6 +465,14 @@ LZ4 = lz4 XZ = xz ZSTD = zstd +# Use the wrapper for the compiler. This wrapper scans for new +# warnings and causes the build to stop upon encountering them. +ifeq ($(CC),$(CROSS_COMPILE)gcc) +ifneq ($(wildcard $(srctree)/scripts/gcc-wrapper.py),) +CC = $(srctree)/scripts/gcc-wrapper.py $(CROSS_COMPILE)gcc +endif +endif + CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) NOSTDINC_FLAGS :=