1. 03 Aug, 2010 1 commit
    • Sam Ravnborg's avatar
      kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line · 6588169d
      Sam Ravnborg authored
      It is now possible to assign options to AS, CC and LD
      on the command line - which is only used when building modules.
      {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC, LD when building modules
      without overriding the original value.
      Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
      that is used by arch specific files and free up
      {A,C,LD}FLAGS_MODULE so they can be assigned on
      the command line.
      All arch Makefiles that used the old variables has been updated.
      Note: Previously we had a MODFLAGS variable for both
      AS and CC. But in favour of consistency this was dropped.
      So in some cases arch Makefile has one assignmnet replaced by
      two assignmnets.
      Note2: MODFLAGS was not documented and is dropped
      without any notice. I do not expect much/any breakage
      from this.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
  2. 18 Sep, 2009 1 commit
  3. 29 Oct, 2008 1 commit
  4. 22 Jul, 2008 1 commit
    • Mathieu Desnoyers's avatar
      markers: fix duplicate modpost entry · d35cb360
      Mathieu Desnoyers authored
      When a kernel was rebuilt, the previous Module.markers was not cleared.
      It caused markers with different format strings to appear as duplicates
      when a markers was changed.  This problem is present since
      scripts/mod/modpost.c started to generate Module.markers, commit
      It therefore applies to 2.6.25, 2.6.26 and linux-next.
      I merely merged the patches from Roland, Wenji and Takashi here.
      Credits to
      Roland McGrath <roland@redhat.com>
      Wenji Huang <wenji.huang@oracle.com>
      Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
      for providing the individual fixes.
      - Changelog :
        - Integrated Takashi's Makefile modification to clear Module.markers upon
          make clean.
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Wenji Huang <wenji.huang@oracle.com>
      Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  5. 31 May, 2008 1 commit
    • Sam Ravnborg's avatar
      kbuild: fix $(src) assignmnet with external modules · 96d97f26
      Sam Ravnborg authored
      When we introduced support for KBUILD_EXTRA_SYMBOLS
      we started to include the externam module's kbuild
      file when doing the final modpost step.
      As external modules often do:
      ccflags-y := -I$(src)
      We had problems because $(src) was unassinged and
      gcc then used the next parameter for -I resulting in
      strange build failures.
      Fix is to assign $(src) and $(obj) when building
      external modules.
      This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Tvrtko <tvrtko.ursulin@sophos.com>
      Cc: Andrea Arcangeli <andrea@qumranet.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
  6. 26 Apr, 2008 1 commit
  7. 25 Apr, 2008 1 commit
  8. 23 Mar, 2008 1 commit
  9. 13 Feb, 2008 1 commit
    • Mathieu Desnoyers's avatar
      Linux Kernel Markers: create modpost file · b2e3e658
      Mathieu Desnoyers authored
      This adds some new magic in the MODPOST phase for CONFIG_MARKERS.  Analogous
      to the Module.symvers file, the build will now write a Module.markers file
      when CONFIG_MARKERS=y is set.  This file lists the name, defining module, and
      format string of each marker, separated by \t characters.  This simple text
      file can be used by offline build procedures for instrumentation code,
      analogous to how System.map and Module.symvers can be useful to have for
      kernels other than the one you are running right now.
      The strings are made easy to extract by having the __trace_mark macro define
      the name and format together in a single array called __mstrtab_* in the
      __markers_strings section.  This is straightforward and reliable as long as
      the marker structs are always defined by this macro.  It is an unreasonable
      amount of hairy work to extract the string pointers from the __markers section
      structs, which entails handling a relocation type for every machine under the
      Mathieu :
      - Ran through checkpatch.pl
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: David Smith <dsmith@redhat.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  10. 28 Jan, 2008 1 commit
    • Sam Ravnborg's avatar
      kbuild: add verbose option to Section mismatch reporting in modpost · 588ccd73
      Sam Ravnborg authored
      If the config option CONFIG_SECTION_MISMATCH is not set and
      we see a Section mismatch present the following to the user:
      modpost: Found 1 section mismatch(es).
      To see additional details select "Enable full Section mismatch analysis"
      in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).
      If the option CONFIG_SECTION_MISMATCH is selected
      then be verbose in the Section mismatch reporting from mdopost.
      Sample outputs:
      WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
      The function  discover_ebda() references
      the variable __initdata ebda_addr.
      This is often because discover_ebda lacks a __initdata
      annotation or the annotation of ebda_addr is wrong.
      WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
      The variable pci_serial_quirks references
      the function __devexit pci_plx9050_exit()
      If the reference is valid then annotate the
      variable with __exit* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
      The symbol arch_register_cpu is exported and annotated __cpuinit
      Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  11. 25 Jul, 2007 2 commits
  12. 17 Jul, 2007 1 commit
    • Sam Ravnborg's avatar
      kbuild: do section mismatch check on full vmlinux · 741f98fe
      Sam Ravnborg authored
      Previously we did do the check on the .o files used to link
      vmlinux but that failed to find questionable references across
      the .o files.
      Create a dedicated vmlinux.o file used only for section mismatch checks
      that uses the defualt linker script so section does not get renamed.
      The vmlinux.o may later be used as part of the the final link of vmlinux
      but for now it is used fo section mismatch only.
      For a defconfig build this is instant but for an allyesconfig this
      add two minutes to a full build (that anyways takes ~2 hours).
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  13. 02 May, 2007 1 commit
  14. 17 Oct, 2006 1 commit
  15. 01 Oct, 2006 1 commit
    • Sam Ravnborg's avatar
      kbuild: make modpost processing configurable · ea837f1c
      Sam Ravnborg authored
      On request from Al Viro make modpost processing configurable.
      KBUILD_MODPOST_WARN can be set to make modpost warn instead of
      error out in case on unresolved symbols in final module link.
      KBUILD_MODPOST_NOFINAL can be set to avoid the final and timeconsuming
      .c file generation and link of .ko files. This is solely useful for
      speeding up when doing compile checks with for example allmodconfig
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  16. 25 Sep, 2006 2 commits
  17. 01 Aug, 2006 1 commit
  18. 01 Jul, 2006 1 commit
    • Sam Ravnborg's avatar
      kbuild: fix ia64 breakage after introducing make -rR · 5e8d780d
      Sam Ravnborg authored
      kbuild used $¤(*F to get filename of target without extension.
      This was used in several places all over kbuild, but introducing
      make -rR broke his for all cases where we specified full path to
      target/prerequsite. It is assumed that make -rR disables old style
      suffix-rules which is why is suddenly failed.
      ia64 was impacted by this change because several div* routines in
      arch/ia64/lib are build using explicit paths and then kbuild failed.
      Thanks to David Mosberger-Tang <David.Mosberger@acm.org> for an explanation
      what was the root-cause and for testing on ia64.
      This patch also fixes two uses of $(*F) in arch/um
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  19. 26 Jun, 2006 1 commit
    • Linus Torvalds's avatar
      Revert "kbuild: fix make -rR breakage" · d38b6968
      Linus Torvalds authored
      This reverts commit e5c44fd8.
      Thanks to Daniel Ritz and Michal Piotrowski for noticing the problem.
      Daniel says:
        "[The] reason is a recent change that made modules always shows as
         module.mod.  it breaks modprobe and probably many scripts..besides
         lsmod looking horrible
         stuff like this in modprobe.conf:
              install pcmcia_core /sbin/modprobe --ignore-install pcmcia_core; /sbin/modprobe pcmcia
         makes modprobe fork/exec endlessly calling itself...until oom
         interrupts it"
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  20. 24 Jun, 2006 1 commit
    • Sam Ravnborg's avatar
      kbuild: fix make -rR breakage · e5c44fd8
      Sam Ravnborg authored
      make failed to supply the filename when using make -rR and using $(*F)
      to get target filename without extension.
      This bug was not reproduceable in small scale but using:
      $(basename $(notdir $@)) fixes it with same functionality.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  21. 08 Jun, 2006 1 commit
    • Roman Zippel's avatar
      kconfig: fix .config dependencies · c955ccaf
      Roman Zippel authored
      This fixes one of the worst kbuild warts left - the broken dependencies used
      to check and regenerate the .config file.  This was done via an indirect
      dependency and the .config itself had an empty command, which can cause make
      not to reread the changed .config file.
      Instead of this we generate now a new file include/config/auto.conf from
      .config, which is used for kbuild and has the proper dependencies.  It's also
      the main make target now for all files generated during this step (and thus
      replaces include/linux/autoconf.h).
      This also means we can now relax the syntax requirements for the .config file
      and we don't have to rewrite it all the time, i.e.  silentoldconfig only
      writes .config now when it's necessary to keep it in sync with the Kconfig
      files and even this can be suppressed by setting the environment variable
      KCONFIG_NOSILENTUPDATE, so the update can (and must) be done manually.
      Signed-off-by: default avatarRoman Zippel <zippel@linux-m68k.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  22. 24 Mar, 2006 1 commit
  23. 05 Mar, 2006 1 commit
  24. 19 Feb, 2006 1 commit
    • Sam Ravnborg's avatar
      kbuild: improved modversioning support for external modules · 040fcc81
      Sam Ravnborg authored
      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: default avatarSam Ravnborg <sam@ravnborg.org>
  25. 09 Jan, 2006 1 commit
  26. 25 Jul, 2005 1 commit
    • Sam Ravnborg's avatar
      kbuild: introduce Kbuild.include · 8ec4b4ff
      Sam Ravnborg authored
      Kbuild.include is a placeholder for definitions originally present in
      both the top-level Makefile and scripts/Makefile.build.
      There were a slight difference in the filechk definition, so the most videly
      used version was kept and usr/Makefile was adopted for this syntax.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  27. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      Let it rip!