On Sun, 23 Jun 2002 12:14:59 +0100, Jak <[EMAIL PROTECTED]> wrote: >Here are some more questions/observations on using kbuild : I hope >this kind of feedback is useful. > >1) what version of make ? Makefile-2.5 suggests I need at least 3.79.1 >but kbuild-2.5.txt says 3.7[78] will work ( section CONTROLLING KBUILD ).
I tried to keep to 3.77 for compatibility with the 2.4 kernel (only requires 3.77) but had to abandon that aim. The recommended version of make is 3.79, I will update the docs. >2) $USER_VERSION versus $USERVERSION ? >Documentation/kbuild/kbuild-2.5.txt refers to USER_VERSION, but >Makefile-2.5 uses USERVERSION. Also, kbuild-2.5.txt refers to >file .tmp_A_version which does not seem to exist. Assuming >.tmp_A_version is not required, this is my take on USERVERSION It should be USERVERSION, not USER_VERSION. .tmp_A_version used to exist but no longer. Documentation updated. >3) what are the legal options for using shadow tree(s) e.g. > what is the proper procedure for switching between using shadow tree(s), >then reverting to Linus sources. It looks like I need to do make mrproper and full >recompile, >even though I am only ever likely to be changing/adding/dropping compilation of a >small >number of objects. I would have expected the "only rebuild what's necessary" >philosophy to apply here. That is what should occur. Adding or deleting a shadow tree should only rebuild based on the files that were added, deleted, shadowed or unshadowed. If something else is occurring, I need the details. >I think shadow tree support is a feature that will impress lots of people most, and >deserves >more detailed description/instructions. Linus and Kai do not think that shadow trees are useful. I have given up explaining why they are useful. Now I am waiting until Kai hits a dead end using the current syntax (there is no way that the current syntax can cope with shadow trees) then I will try to raise some interest in using the new syntax to get the advanced features of kbuild 2.5. >4) make *config insists I must do make dep >( I am trying kbuild-*-2.4.19-pre10 >while 2.5.x plays hard to compile ). Compatibility glue with kbuild 2.4. They use the same scripts for make *config and dep is required for kbuild 2.4. >5) I can't figure out how to make the kernel docs now. I can see a Makefile.in in >Documentation/DocBook, >so there must be a way ! >There should probably be some scripts or instructions for each of the old Makefile >targets now evicted >from Makefile-2.5. make one of doc-books, doc-ps, doc-pdf, doc-html. >6) Finally, in the "file this under curiosities department", I have seen the >following error output a couple of times : >make -f $KBUILD_SRCTREE_000/Makefile-2.5 -j2 HOSTCC=gcc-3.1 CC=gcc-3.1 >Using ARCH='i386' AS='as' LD='ld' CC='gcc-3.1' CPP='gcc-3.1 -E' AR='ar' HOSTAS='as' >HOSTLD='gcc' HOSTCC='gcc-3.1' HOSTAR='ar' >Generating global Makefile > phase 1 (find all inputs) >/home/compo/2.4-src/scripts/pp_makefile4.c: In function `read_tmp_select': >/home/compo/2.4-src/scripts/pp_makefile4.c:686: warning: `eof' might be used >uninitialized in this function >/home/compo/2.4-src/scripts/pp_makefile4.c: In function `read_makefile': >/home/compo/2.4-src/scripts/pp_makefile4.c:781: warning: `eof' might be used >uninitialized in this function >/home/compo/2.4-src/scripts/pp_makefile4.c: In function `copy_makefile': >/home/compo/2.4-src/scripts/pp_makefile4.c:2711: warning: `eof' might be used >uninitialized in this function > phase 2 (convert all Makefile.in files) > phase 3 (evaluate selections) > phase 4 (integrity checks, write global makefile) >Starting phase 5 (build) for installable gcc 3.1 being a little too smart for its own good, the warnings are spurious. Changing int ... eof, to int ... eof=0, will avoid those warnings. >This happens sometimes if I do make mrproper; cp saved.config $KBUILD_OBJTREE/.config >; make oldconfig installable >It doesn't seem to cause any problems, and the .config file is OK thereafter. The >saved.config file may be from a previous >kernel version, so maybe it has some invalid config ? Probably a "don't do that !", >but saving a .config file and copying >it to $KBUILD_OBJTREE is referred to in kbuild-2.5.txt. The gcc warnings have nothing to do with copying configs around, what you are doing is perfectly valid. make mrproper deletes everything including pp_makefile4, the warnings occur with gcc 3.1 on every build of pp_makefile4. >Hey, new question, in the command line in above example, I specified CC and HOSTCC. >CPP becomes $(CC) -E, >whereas HOSTLD stays as gcc. So I need to specify 3 command line variables CC, HOSTCC >& HOSTLD to avoid >using whatever compiler gcc happens to point at. Is HOSTLD = gcc when HOSTCC != gcc >correct ? Correct but unexpected. Using gcc as a replacement for HOSTLD overcomes problems with extra flags that LD does not recognise. I will change HOSTLD to default to HOSTCC. It probably does no harm using different versions of gcc for compile and link but why risk it? ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel