Skip to content
Snippets Groups Projects
  1. Jan 06, 2019
  2. Nov 01, 2018
  3. Aug 22, 2018
  4. Jul 20, 2018
    • Dirk Gouders's avatar
      kbuild: if_changed: document single use per target limitation · bb81955f
      Dirk Gouders authored
      
      Users of if_changed could easily feel invited to use it to divide a
      recipe into parts like:
      
      a: prereq FORCE
      	$(call if_changed,do_a)
      	$(call if_changed,do_b)
      
      But this is problematic, because if_changed should not be used more
      than once per target: in the above example, if_changed stores the
      command-line of the given command in .a.cmd and when a is up-to-date
      with respect to prereq, the file .a.cmd contains the command-line for
      the last command executed, i.e. do_b.
      
      When the recipe is then executed again, without any change of
      prerequisites, the command-line check for do_a will fail, do_a will be
      executed and stored in .a.cmd.  The next check, however, will still see
      the old content (the file isn't re-read) and if_changed will skip
      do_b, because the command-line test will not recognize a change.  On
      the next execution of the recipe the roles will flip: do_a is OK but
      do_b not and it will be executed.  And so on...
      
      Signed-off-by: default avatarDirk Gouders <dirk@gouders.net>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      bb81955f
  5. Jul 17, 2018
  6. Mar 25, 2018
    • Masahiro Yamada's avatar
      kbuild: remove command line interface LDFLAGS_MODULE from makefiles.txt · 35cd02be
      Masahiro Yamada authored
      
      Documentation/kbuild/makefiles.txt lists variables used in Makefile
      whereas Documentation/kbuild/kbuild.txt describes user assignable
      parameters given via environments or the command line.
      
      LDFLAGS_MODULE is a command line interface, so it should be dropped
      from makefiles.txt.
      
      Some lines below in this file, it is clearly explained that
      KBUILD_LDFLAGS_MODULE is the right one for the internal use:
      
          KBUILD_LDFLAGS_MODULE   Options for $(LD) when linking modules
      
              $(KBUILD_LDFLAGS_MODULE) is used to add arch-specific options
              used when linking modules. This is often a linker script.
              From commandline LDFLAGS_MODULE shall be used (see kbuild.txt).
      
      Then, kbuild.txt explains LDFLAGS_MODULE, like follows:
      
          LDFLAGS_MODULE
          --------------------------------------------------
          Additional options used for $(LD) when linking modules.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      35cd02be
    • Nicholas Piggin's avatar
      kbuild: rename built-in.o to built-in.a · f49821ee
      Nicholas Piggin authored
      
      Incremental linking is gone, so rename built-in.o to built-in.a, which
      is the usual extension for archive files.
      
      This patch does two things, first is a simple search/replace:
      
      git grep -l 'built-in\.o' | xargs sed -i 's/built-in\.o/built-in\.a/g'
      
      The second is to invert nesting of nested text manipulations to avoid
      filtering built-in.a out from libs-y2:
      
      -libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.a, $(libs-y)))
      +libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y)))
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f49821ee
    • Nicholas Piggin's avatar
      kbuild: remove incremental linking option · 6358d6e8
      Nicholas Piggin authored
      
      This removes the old `ld -r` incremental link option, which has not
      been selected by any architecture since June 2017.
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      6358d6e8
  7. Nov 08, 2017
  8. Oct 24, 2017
  9. Aug 07, 2017
  10. Jun 25, 2017
  11. Jun 21, 2017
    • Masahiro Yamada's avatar
      kbuild: replace genhdr-y with generated-y · ae3f4151
      Masahiro Yamada authored
      
      Originally, generated-y and genhdr-y had different meaning, like
      follows:
      
      - generated-y: generated headers (other than asm-generic wrappers)
      - header-y   : headers to be exported
      - genhdr-y   : generated headers to be exported (generated-y + header-y)
      
      Since commit fcc8487d ("uapi: export all headers under uapi
      directories"), headers under UAPI directories are all exported.
      So, there is no more difference between generated-y and genhdr-y.
      
      We see two users of genhdr-y, arch/{arm,x86}/include/uapi/asm/Kbuild.
      They generate some headers in arch/{arm,x86}/include/generated/uapi/asm
      directories, which are obviously exported.
      
      Replace them with generated-y, and abolish genhdr-y.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      ae3f4151
  12. May 18, 2017
  13. May 10, 2017
    • Nicolas Dichtel's avatar
      uapi: export all arch specifics directories · 61562f98
      Nicolas Dichtel authored
      
      This patch removes the need of subdir-y. Now all files/directories under
      arch/<arch>/include/uapi/ are exported.
      
      The only change for userland is the layout of the command 'make
      headers_install_all': directories asm-<arch> are replaced by arch-<arch>/.
      Those new directories contains all files/directories of the specified arch.
      
      Note that only cris and tile have more directories than only asm:
       - arch-v[10|32] for cris;
       - arch for tile.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      61562f98
    • Nicolas Dichtel's avatar
      uapi: export all headers under uapi directories · fcc8487d
      Nicolas Dichtel authored
      
      Regularly, when a new header is created in include/uapi/, the developer
      forgets to add it in the corresponding Kbuild file. This error is usually
      detected after the release is out.
      
      In fact, all headers under uapi directories should be exported, thus it's
      useless to have an exhaustive list.
      
      After this patch, the following files, which were not exported, are now
      exported (with make headers_install_all):
      asm-arc/kvm_para.h
      asm-arc/ucontext.h
      asm-blackfin/shmparam.h
      asm-blackfin/ucontext.h
      asm-c6x/shmparam.h
      asm-c6x/ucontext.h
      asm-cris/kvm_para.h
      asm-h8300/shmparam.h
      asm-h8300/ucontext.h
      asm-hexagon/shmparam.h
      asm-m32r/kvm_para.h
      asm-m68k/kvm_para.h
      asm-m68k/shmparam.h
      asm-metag/kvm_para.h
      asm-metag/shmparam.h
      asm-metag/ucontext.h
      asm-mips/hwcap.h
      asm-mips/reg.h
      asm-mips/ucontext.h
      asm-nios2/kvm_para.h
      asm-nios2/ucontext.h
      asm-openrisc/shmparam.h
      asm-parisc/kvm_para.h
      asm-powerpc/perf_regs.h
      asm-sh/kvm_para.h
      asm-sh/ucontext.h
      asm-tile/shmparam.h
      asm-unicore32/shmparam.h
      asm-unicore32/ucontext.h
      asm-x86/hwcap2.h
      asm-xtensa/kvm_para.h
      drm/armada_drm.h
      drm/etnaviv_drm.h
      drm/vgem_drm.h
      linux/aspeed-lpc-ctrl.h
      linux/auto_dev-ioctl.h
      linux/bcache.h
      linux/btrfs_tree.h
      linux/can/vxcan.h
      linux/cifs/cifs_mount.h
      linux/coresight-stm.h
      linux/cryptouser.h
      linux/fsmap.h
      linux/genwqe/genwqe_card.h
      linux/hash_info.h
      linux/kcm.h
      linux/kcov.h
      linux/kfd_ioctl.h
      linux/lightnvm.h
      linux/module.h
      linux/nbd-netlink.h
      linux/nilfs2_api.h
      linux/nilfs2_ondisk.h
      linux/nsfs.h
      linux/pr.h
      linux/qrtr.h
      linux/rpmsg.h
      linux/sched/types.h
      linux/sed-opal.h
      linux/smc.h
      linux/smc_diag.h
      linux/stm.h
      linux/switchtec_ioctl.h
      linux/vfio_ccw.h
      linux/wil6210_uapi.h
      rdma/bnxt_re-abi.h
      
      Note that I have removed from this list the files which are generated in every
      exported directories (like .install or .install.cmd).
      
      Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all
      subdirs with a pure makefile command.
      
      For the record, note that exported files for asm directories are a mix of
      files listed by:
       - include/uapi/asm-generic/Kbuild.asm;
       - arch/<arch>/include/uapi/asm/Kbuild;
       - arch/<arch>/include/asm/Kbuild.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarMark Salter <msalter@redhat.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      fcc8487d
    • Nicolas Dichtel's avatar
      Makefile.headersinst: remove destination-y option · bd73a328
      Nicolas Dichtel authored
      
      This option was added in commit c7bb349e ("kbuild: introduce destination-y
      for exported headers") but never used in-tree.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      bd73a328
  14. Sep 09, 2016
  15. Jul 07, 2016
  16. Jul 06, 2015
    • Michal Marek's avatar
      kbuild: Allow arch Makefiles to override {cpp,ld,c}flags · 61754c18
      Michal Marek authored
      
      Since commit a1c48bb1 (Makefile: Fix unrecognized cross-compiler command
      line options), the arch Makefile is included earlier by the main
      Makefile, preventing the arc architecture to set its -O3 compiler
      option. Since there might be more use cases for an arch Makefile to
      fine-tune the options, add support for ARCH_CPPFLAGS, ARCH_AFLAGS and
      ARCH_CFLAGS variables that are appended to the respective kbuild
      variables. The user still has the final say via the KCPPFLAGS, KAFLAGS
      and KCFLAGS variables.
      
      Reported-by: default avatarVineet Gupta <Vineet.Gupta1@synopsys.com>
      Cc: stable@vger.kernel.org # 3.16+
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
      61754c18
  17. Jun 08, 2015
  18. Jan 09, 2015
  19. Jan 08, 2015
  20. Aug 19, 2014
  21. Jul 16, 2014
  22. Jun 18, 2014
  23. Apr 08, 2013
  24. Feb 08, 2013
  25. Nov 30, 2012
    • Stephen Warren's avatar
      kbuild: centralize .dts->.dtb rule · 90b335fb
      Stephen Warren authored
      
      All architectures that use cmd_dtc do so in almost the same way. Create
      a central build rule to avoid duplication. The one difference is that
      most current uses of dtc build $(obj)/%.dtb from $(src)/dts/%.dts rather
      than building the .dtb in the same directory as the .dts file. This
      difference will be eliminated arch-by-arch in future patches.
      
      MIPS is the exception here; it already uses the exact same rule as the
      new common rule, so the duplicate is removed in this patch to avoid any
      conflict. arch/mips changes courtesy of Ralf Baechle.
      
      Update Documentation/kbuild to remove the explicit call to cmd_dtc from
      the example, now that the rule exists in a centralized location.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: linux@lists.openrisc.net
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: linux-c6x-dev@linux-c6x.org
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: microblaze-uclinux@itee.uq.edu.au
      Cc: Chris Zankel <chris@zankel.net>
      Cc: linux-xtensa@linux-xtensa.org
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      90b335fb
  26. Oct 02, 2012
  27. Nov 17, 2011
    • H. Peter Anvin's avatar
      kbuild: Add support for an "archheaders" target · 052ad274
      H. Peter Anvin authored
      
      Add support for an "archheaders" target.  This target can generate
      files that need to be installed for user space by "make
      headers_install" or "make headers_install_all".
      
      In order to support "make headers_install_all", it must be able to run
      without the tree having to be configured first.
      
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      052ad274
  28. Jun 13, 2011
  29. May 03, 2011
  30. Apr 28, 2011
    • Sam Ravnborg's avatar
      kbuild: asm-generic support · d8ecc5cd
      Sam Ravnborg authored
      There is an increasing amount of header files
      shared between individual architectures in asm-generic.
      To avoid a lot of dummy wrapper files that just
      include the corresponding file in asm-generic provide
      some basic support in kbuild for this.
      
      With the following patch an architecture can maintain
      a list of files in the file arch/$(ARCH)/include/asm/Kbuild
      
      To use a generic file just add:
      
              generic-y += <name-of-header-file.h>
      
      For each file listed kbuild will generate the necessary
      wrapper in arch/$(ARCH)/include/generated/asm.
      
      When installing userspace headers a wrapper is likewise created.
      
      The original inspiration for this came from the unicore32
      patchset - although a different method is used.
      
      The patch includes several improvements from Arnd Bergmann.
      Michael Marek contributed Makefile.asm-generic.
      
      Remis Baima did an intial implementation along to achive
      the same - see https://patchwork.kernel.org/patch/13352/
      
      
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarGuan Xuetao <guanxuetao@mprc.pku.edu.cn>
      Tested-by: default avatarGuan Xuetao <guanxuetao@mprc.pku.edu.cn>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Remis Lima Baima <remis.developer@googlemail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      d8ecc5cd
  31. Apr 20, 2011
Loading