From 9207ce05c2e44773f64fc0e0e4921fb592f0b62c Mon Sep 17 00:00:00 2001 From: Ashutosh Naik Date: Sat, 25 Oct 2008 15:02:53 -0700 Subject: [PATCH] --- yaml --- r: 118167 b: refs/heads/master c: e6e6733ed9451827165d853f25bf99ba55e12feb h: refs/heads/master i: 118165: 6a5d15f0b0b8fdd961a28ed94912bd3ded76bfe8 118163: cd3102b1f2160cb0833b271ed8c44ed279f9dbae 118159: fdf1cc2cf43a183802d5c7adb103727ceba9b034 v: v3 --- [refs] | 2 +- trunk/scripts/mod/sumversion.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index bac15fa43c1b..923ca1748d60 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 92f83cc56eeafdb8fcf07ceb89fd9a0212bd498c +refs/heads/master: e6e6733ed9451827165d853f25bf99ba55e12feb diff --git a/trunk/scripts/mod/sumversion.c b/trunk/scripts/mod/sumversion.c index d9cc6901d680..aadc5223dcdb 100644 --- a/trunk/scripts/mod/sumversion.c +++ b/trunk/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; }