]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Jul 2013 23:05:40 +0000 (16:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Jul 2013 23:05:40 +0000 (16:05 -0700)
Pull kbuild updates from Michal Marek:
 - fix for make headers_install argv explosion with too long path
 - scripts/setlocalversion does not call git update-index needlessly
 - fix for the src.rpm produced by make rpm-pkg.  The new make
   image_name can be useful also for other packaging tools.
 - scripts/mod/devicetable-offsets.o is not rebuilt during each make run
 - make modules_install dependency fix
 - scripts/sortextable portability fix
 - fix for kbuild to generate the output directory for all object files
   in subdirs.
 - a couple of minor fixes

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: create directory for dir/file.o
  tools/include: use stdint types for user-space byteshift headers
  Makefile: Fix install error with make -j option
  Fix a build warning in scripts/mod/file2alias.c
  improve modalias building
  scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/
  kbuild: fix error when building from src rpm
  scripts/setlocalversion on write-protected source tree
  Makefile.lib: align DTB quiet_cmd
  kbuild: fix make headers_install when path is too long

1  2 
Makefile
scripts/Makefile.lib
scripts/mod/file2alias.c

diff --combined Makefile
index 170ed7c159f4115ea809514921afbbace1ec8328,29339b4301269f3487f6dd61ff6cb55d5584bcb8..e631e6c05f8e37e7dc39c86f1532d3f6340812aa
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 3
  PATCHLEVEL = 10
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 +EXTRAVERSION =
  NAME = Unicycling Gorilla
  
  # *DOCUMENTATION*
@@@ -794,7 -794,7 +794,7 @@@ PHONY += $(vmlinux-dirs
  $(vmlinux-dirs): prepare scripts
        $(Q)$(MAKE) $(build)=$@
  
 -# Store (new) KERNELRELASE string in include/config/kernel.release
 +# Store (new) KERNELRELEASE string in include/config/kernel.release
  include/config/kernel.release: include/config/auto.conf FORCE
        $(Q)rm -f $@
        $(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@
@@@ -981,7 -981,7 +981,7 @@@ _modinst_
  # boot a modules.dep even before / is mounted read-write.  However the
  # boot script depmod is the master version.
  PHONY += _modinst_post
- _modinst_post: _modinst_
+ _modinst_post: include/config/kernel.release _modinst_
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
        $(call cmd,depmod)
  
@@@ -1116,6 -1116,7 +1116,7 @@@ help
        @echo  '  gtags           - Generate GNU GLOBAL index'
        @echo  '  kernelrelease   - Output the release version string'
        @echo  '  kernelversion   - Output the version stored in Makefile'
+       @echo  '  image_name      - Output the image name'
        @echo  '  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
         echo  '                    (default: $(INSTALL_HDR_PATH))'; \
         echo  ''
@@@ -1310,7 -1311,7 +1311,7 @@@ export_report
  endif #ifeq ($(config-targets),1)
  endif #ifeq ($(mixed-targets),1)
  
- PHONY += checkstack kernelrelease kernelversion
+ PHONY += checkstack kernelrelease kernelversion image_name
  
  # UML needs a little special treatment here.  It wants to use the host
  # toolchain, so needs $(SUBARCH) passed to checkstack.pl.  Everyone
@@@ -1331,6 -1332,9 +1332,9 @@@ kernelrelease
  kernelversion:
        @echo $(KERNELVERSION)
  
+ image_name:
+       @echo $(KBUILD_IMAGE)
  # Clear a bunch of variables before executing the submake
  tools/: FORCE
        $(Q)mkdir -p $(objtree)/tools
diff --combined scripts/Makefile.lib
index 6031e2380638f5f492eee301f3f3a8998ec9b0b0,a5c05ae95225548c20340c8dc1602b71020024b5..49392ecbef17baf113bb9e3771384d06413bbb25
@@@ -63,7 -63,7 +63,7 @@@ multi-objs   := $(multi-objs-y) $(multi
  subdir-obj-y := $(filter %/built-in.o, $(obj-y))
  
  # $(obj-dirs) is a list of directories that contain object files
- obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))
+ obj-dirs := $(dir $(multi-objs) $(obj-y))
  
  # Replace multi-part objects by their individual parts, look at local dir only
  real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y)
@@@ -149,7 -149,7 +149,7 @@@ cpp_flags      = -Wp,-MD,$(depfile) $(N
  
  ld_flags       = $(LDFLAGS) $(ldflags-y)
  
 -dtc_cpp_flags  = -Wp,-MD,$(depfile).pre -nostdinc                        \
 +dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
                 -I$(srctree)/arch/$(SRCARCH)/boot/dts                   \
                 -I$(srctree)/arch/$(SRCARCH)/boot/dts/include           \
                 -undef -D__DTS__
@@@ -244,7 -244,7 +244,7 @@@ cmd_gzip = (cat $(filter-out FORCE,$^) 
  # ---------------------------------------------------------------------------
  
  # Generate an assembly file to wrap the output of the device tree compiler
- quiet_cmd_dt_S_dtb= DTB    $@
+ quiet_cmd_dt_S_dtb= DTB     $@
  cmd_dt_S_dtb=                                         \
  (                                                     \
        echo '\#include <asm-generic/vmlinux.lds.h>';   \
@@@ -264,14 -264,14 +264,14 @@@ $(obj)/%.dtb.S: $(obj)/%.dt
  quiet_cmd_dtc = DTC     $@
  cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
        $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
 -              -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \
 -              -d $(depfile).dtc $(dtc-tmp) ; \
 -      cat $(depfile).pre $(depfile).dtc > $(depfile)
 +              -i $(dir $<) $(DTC_FLAGS) \
 +              -d $(depfile).dtc.tmp $(dtc-tmp) ; \
 +      cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
  
  $(obj)/%.dtb: $(src)/%.dts FORCE
        $(call if_changed_dep,dtc)
  
 -dtc-tmp = $(subst $(comma),_,$(dot-target).dts)
 +dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
  
  # Bzip2
  # ---------------------------------------------------------------------------
@@@ -311,11 -311,6 +311,11 @@@ cmd_lzo = (cat $(filter-out FORCE,$^) 
        lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
        (rm -f $@ ; false)
  
 +quiet_cmd_lz4 = LZ4     $@
 +cmd_lz4 = (cat $(filter-out FORCE,$^) | \
 +      lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
 +      (rm -f $@ ; false)
 +
  # U-Boot mkimage
  # ---------------------------------------------------------------------------
  
diff --combined scripts/mod/file2alias.c
index d9e67b719f08e013d4d8da8aaf579332e19f9c23,ab554564569aab61c9da76ae6ab92b08553cd04c..23708636b05c873f78b1ef5911eb795ba7114497
@@@ -79,10 -79,12 +79,12 @@@ struct devtable **__start___devtable, *
  extern struct devtable *__start___devtable[], *__stop___devtable[];
  #endif /* __MACH__ */
  
- #if __GNUC__ == 3 && __GNUC_MINOR__ < 3
- # define __used                       __attribute__((__unused__))
- #else
- # define __used                       __attribute__((__used__))
+ #if !defined(__used)
+ # if __GNUC__ == 3 && __GNUC_MINOR__ < 3
+ #  define __used                      __attribute__((__unused__))
+ # else
+ #  define __used                      __attribute__((__used__))
+ # endif
  #endif
  
  /* Define a variable f that holds the value of field f of struct devid
@@@ -1145,26 -1147,6 +1147,26 @@@ static int do_mei_entry(const char *fil
  }
  ADD_TO_DEVTABLE("mei", mei_cl_device_id, do_mei_entry);
  
 +/* Looks like: rapidio:vNdNavNadN */
 +static int do_rio_entry(const char *filename,
 +                      void *symval, char *alias)
 +{
 +      DEF_FIELD(symval, rio_device_id, did);
 +      DEF_FIELD(symval, rio_device_id, vid);
 +      DEF_FIELD(symval, rio_device_id, asm_did);
 +      DEF_FIELD(symval, rio_device_id, asm_vid);
 +
 +      strcpy(alias, "rapidio:");
 +      ADD(alias, "v", vid != RIO_ANY_ID, vid);
 +      ADD(alias, "d", did != RIO_ANY_ID, did);
 +      ADD(alias, "av", asm_vid != RIO_ANY_ID, asm_vid);
 +      ADD(alias, "ad", asm_did != RIO_ANY_ID, asm_did);
 +
 +      add_wildcard(alias);
 +      return 1;
 +}
 +ADD_TO_DEVTABLE("rapidio", rio_device_id, do_rio_entry);
 +
  /* Does namelen bytes of name exactly match the symbol? */
  static bool sym_is(const char *name, unsigned namelen, const char *symbol)
  {