[PATCH] Revert "fixdep: Do not record dependency on the source file itself"

From: Henrik Rydberg
Date: Fri Mar 11 2011 - 03:54:33 EST


In 2.6.38-rc8, the module srcversion is not unique. Doing a

cat /sys/module/*/srcversion | sort | uniq -c

shows something like this:

mainline>cat /sys/module/*/srcversion | sort | uniq -c
1 3EF20C25CC62BD750F4C3F3
1 41024DA8E830C7DAE171017
1 47AD35AE180473EB06EED32
19 533BB7E5866E52F63B9ACCB
1 598C709DDDAB55EB331379A
1 5AC5CB9DA8C242CBC76EEC0
1 AAD974CC23F320629986F38
2 AEBBDFD273E0316FD4E5D04
[...]

Bisecting leads to this commit

commit b7bd182176960fdd139486cadb9962b39f8a2b50
Author: Michal Marek <mmarek@xxxxxxx>

fixdep: Do not record dependency on the source file itself

which is a change to the build system. Reverting followed by "make
clean" cures the symptoms and all module srcversions are unique. Just
doing make after the revert does not work.

I can't even begin to imagine what the real reason is.

This reverts commit b7bd182176960fdd139486cadb9962b39f8a2b50.
---
scripts/basic/fixdep.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 6c94c6c..c9a16ab 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -315,7 +315,6 @@ static void parse_dep_file(void *map, size_t len)
char *end = m + len;
char *p;
char s[PATH_MAX];
- int first;

p = strchr(m, ':');
if (!p) {
@@ -328,7 +327,6 @@ static void parse_dep_file(void *map, size_t len)

clear_config();

- first = 1;
while (m < end) {
while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
m++;
@@ -342,17 +340,9 @@ static void parse_dep_file(void *map, size_t len)
if (strrcmp(s, "include/generated/autoconf.h") &&
strrcmp(s, "arch/um/include/uml-config.h") &&
strrcmp(s, ".ver")) {
- /*
- * Do not output the first dependency (the
- * source file), so that kbuild is not confused
- * if a .c file is rewritten into .S or vice
- * versa.
- */
- if (!first)
- printf(" %s \\\n", s);
+ printf(" %s \\\n", s);
do_config_file(s);
}
- first = 0;
m = p + 1;
}
printf("\n%s: $(deps_%s)\n\n", target, target);
--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/