aboutsummaryrefslogtreecommitdiff
path: root/scripts/mod/sumversion.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-30 12:55:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-30 12:55:49 -0700
commit65fc716fa673cf98fb5887180fd3c52ca0371198 (patch)
tree8f0924bdb63bafec89ece7f4fab36d31a7e9e2b6 /scripts/mod/sumversion.c
parent814b3bed63c23f310121befa0fe004a20dec95b2 (diff)
parent15a2ee74d22674c58f347b16b3af5601fa4e15db (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: Fix incompatibility with versions of Perl less than 5.6.0 kbuild: do not include arch/<ARCH>/include/asm in find-sources twice. kbuild: tag with git revision when git describe is missing kbuild: prevent modpost from looking for a .cmd file for a static library linked into a module kbuild: fix KBUILD_EXTRA_SYMBOLS adjust init section definitions scripts/checksyscalls.sh: fix for non-gnu sed scripts/package: don't break if %{_smp_mflags} isn't set kbuild: setlocalversion: dont include svn change count kbuild: improve check-symlink kbuild: mkspec - fix build rpm
Diffstat (limited to 'scripts/mod/sumversion.c')
-rw-r--r--scripts/mod/sumversion.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
index d9cc6901d68..aadc5223dcd 100644
--- a/scripts/mod/sumversion.c
+++ b/scripts/mod/sumversion.c
@@ -290,6 +290,15 @@ static int parse_file(const char *fname, struct md4_ctx *md)
release_file(file, len);
return 1;
}
+/* Check whether the file is a static library or not */
+static int is_static_library(const char *objfile)
+{
+ int len = strlen(objfile);
+ if (objfile[len - 2] == '.' && objfile[len - 1] == 'a')
+ return 1;
+ else
+ return 0;
+}
/* We have dir/file.o. Open dir/.file.o.cmd, look for deps_ line to
* figure out source file. */
@@ -420,7 +429,8 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen)
while ((fname = strsep(&sources, " ")) != NULL) {
if (!*fname)
continue;
- if (!parse_source_files(fname, &md))
+ if (!(is_static_library(fname)) &&
+ !parse_source_files(fname, &md))
goto release;
}