diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-09 06:24:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-09 06:24:32 -0300 |
commit | 07aa0071b7731c08909ed2ea7ab99a62fa934ff0 (patch) | |
tree | b3d5557c8270425dd0a5fc734516159e9eaf63db | |
parent | d54da4a86ac71c49e0b100b4911a7695d37e93df (diff) | |
download | mediapointer-dvb-s2-07aa0071b7731c08909ed2ea7ab99a62fa934ff0.tar.gz mediapointer-dvb-s2-07aa0071b7731c08909ed2ea7ab99a62fa934ff0.tar.bz2 |
Kbuild: add a new target to check for section mismatches
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | INSTALL | 6 | ||||
-rw-r--r-- | v4l/Makefile | 5 | ||||
-rwxr-xr-x | v4l/scripts/do_merge.pl | 5 |
3 files changed, 15 insertions, 1 deletions
@@ -134,3 +134,9 @@ checkpatch - checks codingstyle and reports using the same checkterse - checks codingstyle and reports using terse syntax, used on several compilaton tools. + +mismatch - checks for linker section mismatch. In other words, + check if some driver has functions not properly + declared with __init/__exit, and similar tags. + It will also be more pedantic by dealing with + compilation warnings as if they are errors. diff --git a/v4l/Makefile b/v4l/Makefile index dc0cfcaa6..23ae32cad 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -45,6 +45,11 @@ default:: config-compat.h Makefile.media links oss firmware ./scripts/rmmod.pl check # $(MAKE) checkpatch +mismatch:: config-compat.h Makefile.media links oss firmware + @echo Kernel build directory is $(OUTDIR) + $(MAKE) -Wfatal-errors -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) CONFIG_DEBUG_SECTION_MISMATCH=y modules + ./scripts/rmmod.pl check + firmware:: $(MAKE) -C firmware prep $(MAKE) -C firmware diff --git a/v4l/scripts/do_merge.pl b/v4l/scripts/do_merge.pl index 0a4433a21..1a6bbb1ee 100755 --- a/v4l/scripts/do_merge.pl +++ b/v4l/scripts/do_merge.pl @@ -153,7 +153,10 @@ if ($n_heads == 2) { # Test resulting tree print "Testing if the build didn't break compilation. Only errors and warnings will be displayed. Please wait.\n"; -$ret = system ('make all|egrep -v "^\s*CC"|egrep -v "^\s*LD"'); +$ret = system ('make allmodconfig'); +if (!ret) { + $ret = system ('make mismatch|egrep -v "^\s*CC"|egrep -v "^\s*LD"'); +} if ($ret) { print "Build failed. Can't procceed.\n"; |