Messages in this thread | | | Date | Thu, 29 Aug 2013 19:55:11 +0200 | From | Sam Ravnborg <> | Subject | Re: Can anyone suggest a better fix? Not sure if I understand the problem, but the patch fixed it |
| |
> > I thought fixdep is about finding module dependency, and > it isn't needed for built-in drivers. > Please correct me if I'm wrong.
You are wrong...
Fixdep conatins all the dependencies used to determine if we shall rebuild foo.o. It has nothing to do with modules or not.
Following happens when you build foo.o from foo.c:
1) gcc -Wp,-MD,foo.o.d foo.c -o foo.o This produces two files: foo.o.d - contains all files included by foo.c, recursive (try it out!) foo.o - the object file
2) fixdep foo.o.d foo.o gcc -Wp,-MD,foo.o.d foo.c -o foo.o > foo.o.tmp fixdep now does the following: - Assign the comandline to a variable - List all dependencies (files included) - Scan the dependen file for CONFIG_* symbols - for each CONFIG_* symbol add a $(wildcard ...) reference to a symbol in include/generated/config/... that represents the CONFIG_ symbol Everything is stored in foo.o.tmp
3) delete foo.o.cmd 4) rename foo.o.tmp to foo.o.cmd
Magic happens in Kbuild.include, Makefile.lib and Makefile.build. But it make take some cup of coffee to grasp it.
For find and fix whatever race condition you hit.
Sam
| |