1. 19 2月, 2006 13 次提交
    • J
      kbuild: fix mkmakefile · 96678281
      Jan Beulich 提交于
      With the current way of generating the Makefile in the output directory
      for builds outside of the source tree, specifying real targets (rather
      than phony ones) doesn't work in an already (partially) built tree, as
      the stub Makefile doesn't have any dependency information available.
      Thus, all targets where files may actually exist must be listed
      explicitly and, due to what I'd call a make misbehavior, directory
      targets must then also be special cased.
      Signed-Off-By: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      96678281
    • J
      kbuild: consolidate command line escaping · 6176aa9a
      Jan Beulich 提交于
      While the recent change to also escape # symbols when storing C-file
      compilation command lines was helpful, it should be in effect for all
      command lines, as much as the dollar escaping should be in effect for
      C-source compilation commands. Additionally, for better readability and
      maintenance, consolidating all the escaping (single quotes, dollars,
      and now sharps) was also desirable.
      Signed-Off-By: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      6176aa9a
    • S
      kbuild: make cc-version available in kbuild files · 20a468b5
      Sam Ravnborg 提交于
      Move $(CC) support functions to Kbuild.include so they are available
      in the kbuild files.
      In addition the following was done:
      	o as-option documented in Documentation/kbuild/makefiles.txt
      	o Moved documentation to new section to match
      	  new scope of functions
      	o added cc-ifversion used to conditionally select a text string
      	  dependent on actual $(CC) version
      	o documented cc-ifversion
      	o change so Kbuild.include is read before the kbuild file
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      20a468b5
    • S
      kbuild: check for section mismatch during modpost stage · b39927cf
      Sam Ravnborg 提交于
      Section mismatch is identified as references to .init*
      sections from non .init sections. And likewise references
      to .exit.* sections outside .exit sections.
      
      .init.* sections are discarded after a module is initialized
      and references to .init.* sections are oops candidates.
      .exit.* sections are discarded when a module is built-in and
      thus references to .exit are also oops candidates.
      
      The checks were possible to do using 'make buildcheck' which
      called the two perl scripts: reference_discarded.pl and
      reference_init.pl. This patch just moves the same functionality
      inside modpost and the scripts are then obsoleted.
      They will though be kept for a while so users can do double
      checks - but note that some .o files are skipped by the perl scripts
      so result is not 1:1.
      All credit for the concept goes to Keith Owens who implemented
      the original perl scrips - this patch just moves it to modpost.
      
      Compared to the perl script the implmentation in modpost will be run
      for each kernel build - thus catching the error much sooner, but
      the downside is that the individual .o file are not always identified.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      b39927cf
    • S
      kbuild: run depmod when installing external modules · a67dc21a
      Sam Ravnborg 提交于
      Following patch enables depmod support when installing external modules.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a67dc21a
    • S
      kbuild: avoid stale modules in $(MODVERDIR) for external modules · fb3cbd2e
      Sam Ravnborg 提交于
      To avoid stale modules located in $(MODVERDIR) aka .tmp_versions/
      always delete the directory when building an external module.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      fb3cbd2e
    • M
      kbuild: Accept various mips sub-types in SUBARCH · 8999257c
      Martin Michlmayr 提交于
      uname -m on MIPS can give a number of results, such as mips64.  We
      need to add another substitution to the sed call for SUBARCH in the
      main Makefile.
      Signed-off-by: NMartin Michlmayr <tbm@cyrius.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      8999257c
    • Z
      x86: align per-cpu section to configured cache bytes · 379b5441
      Zach Brown 提交于
      This matches the fix for a bug seen on x86-64.  Test booted on old hardware
      that had 32 byte cachelines to begin with.
      Signed-off-by: NZach Brown <zach.brown@oracle.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      379b5441
    • S
      kbuild: warn about duplicate exported symbols · 8e70c458
      Sam Ravnborg 提交于
      In modpost introduce a check for symbols exported twice.
      This check caught only one victim (inet_bind_bucket_create) for
      which a patch is already sent to netdev.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      8e70c458
    • S
      kbuild: improved modversioning support for external modules · 040fcc81
      Sam Ravnborg 提交于
      With following patch a second option is enabled to obtain
      symbol information from a second external module when a
      external module is build.
      The recommended approach is to use a common kbuild file but
      that may be impractical in certain cases.
      With this patch one can copy over a Module.symvers from one
      external module to make symbols (and symbol versions) available
      for another external module.
      
      Updated documentation in Documentation/kbuild/modules.txt
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      040fcc81
    • S
      kbuild: apply CodingStyle to modpost.c · 5c3ead8c
      Sam Ravnborg 提交于
      Just some light CodingStyle updates - no functional changes.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      5c3ead8c
    • S
      kbuild: use warn()/fatal() consistent in modpost · cb80514d
      Sam Ravnborg 提交于
      modpost.c provides warn() and fatal() - so use them all over the place.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      cb80514d
    • S
      kbuild: support building individual files for external modules · 06300b21
      Sam Ravnborg 提交于
      Support building individual files when dealing with separate modules.
      So say you have a module named "foo" which consist of two .o files bar.o
      and fun.o.
      
      You can then do:
      make -C $KERNELSRC M=`pwd` bar.o
      make -C $KERNELSRC M=`pwd` bar.lst
      make -C $KERNELSRC M=`pwd` bar.i
      make -C $KERNELSRC M=`pwd` /            <= will build all .o files
                                                 and link foo.o
      make -C $KERNELSRC M=`pwd` foo.ko       <= will build the module
                                                 and do the modpost step
      					   to create foo.ko
      
      The above will also work if the external module is placed in a
      subdirectory using a hirachy of kbuild files.
      Thanks to Andreas Gruenbacher <agruen@suse.de> for initial feature
      request / bug report.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      06300b21
  2. 18 2月, 2006 27 次提交