rk: add gcc-wrapper
authorHuang, Tao <huangtao@rock-chips.com>
Sat, 21 Nov 2015 11:40:34 +0000 (19:40 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Sat, 21 Nov 2015 11:40:34 +0000 (19:40 +0800)
Change-Id: Ie5025f30a747cd40e26eeb6ec939de28af899645
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Makefile
scripts/gcc-wrapper.py

index 3a0234f50f36fb45461fe235c1a91addd4d6214b..54698fb8396a52f213ba4db0f99c53ce5b581cf5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -357,6 +357,12 @@ PERL               = perl
 PYTHON         = python
 CHECK          = sparse
 
 PYTHON         = python
 CHECK          = sparse
 
+# Use the wrapper for the compiler. This wrapper scans for new
+# warnings and causes the build to stop upon encountering them.
+ifneq ($(wildcard $(srctree)/scripts/gcc-wrapper.py),)
+CC             = $(srctree)/scripts/gcc-wrapper.py $(CROSS_COMPILE)gcc
+endif
+
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
                  -Wbitwise -Wno-return-void $(CF)
 CFLAGS_MODULE   =
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
                  -Wbitwise -Wno-return-void $(CF)
 CFLAGS_MODULE   =
index 73ced6707c60acd4acbfcfbb8c3e356d8a725e83..7a99344d6651423e5dd094b0588700d7c180d24d 100755 (executable)
@@ -40,18 +40,13 @@ import subprocess
 # force LANG to be set to en_US.UTF-8 to get consistent warnings.
 
 allowed_warnings = set([
 # force LANG to be set to en_US.UTF-8 to get consistent warnings.
 
 allowed_warnings = set([
-    "return_address.c:63",
-    "hid-appleir.c:347",
-    "hid-magicmouse.c:590",
-    "hid-ntrig.c:1026",
-    "core.c:1334",
-    "menu.c:129",
-    "bus.c:318", # FIXME
-    "atags_to_fdt.c:96",
-    "compat_binfmt_elf.c:58",
-    "psci.c:268",
-    "psci.c:273",
-    "sysctl_net_core.c:24",
+    "core.c:142", # drivers/regulator/core.c:142:6: warning: unused variable 'i'
+    "posix-cpu-timers.c:1268", # kernel/time/posix-cpu-timers.c:1268:13: warning: 'now' may be used uninitialized in this function
+    "af_unix.c:910", # net/unix/af_unix.c:910:20: warning: 'hash' may be used uninitialized in this function
+    "sunxi_sram.c:214", # drivers/soc/sunxi/sunxi_sram.c:214:24: warning: 'device' may be used uninitialized in this function
+    "ks8851.c:298", # drivers/net/ethernet/micrel/ks8851.c:298:2: warning: 'rxb[0]' may be used uninitialized in this function
+    "ks8851.c:421", # drivers/net/ethernet/micrel/ks8851.c:421:20: warning: 'rxb[0]' may be used uninitialized in this function
+    "rockchip_drm_vop.c:581", # drivers/gpu/drm/rockchip/rockchip_drm_vop.c:581:49: warning: 'vskiplines' may be used uninitialized in this function
  ])
 
 # Capture the name of the object file, can find it.
  ])
 
 # Capture the name of the object file, can find it.