]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Oct 2012 01:27:27 +0000 (10:27 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Oct 2012 01:27:27 +0000 (10:27 +0900)
Pull kbuild changes from Michal Marek:
 "The main part of kbuild for v3.7 contains:
   - Fix for scripts/Makefile.modpost to not choke on a '.ko' substring
     in the build directory path
   - Two warning fixes (modpost and main Makefile)
   - __compiletime_error works also with gcc 4.3
   - make tar{gz,bz2,xz}-pkg uses default compression settings instead
     of saving as many bytes as possible (this should actually be in the
     misc branch, I don't know why I applied it here)."

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  compiler-gcc4.h: correct verion check for __compiletime_error
  modpost: Permit .GCC.command.line sections
  Kbuild: use normal compression settings for tar*-pkg
  scripts/Makefile.modpost: error in finding modules from .mod files.
  kbuild: Remove useless warning while appending KCFLAGS

1  2 
Makefile
include/linux/compiler-gcc4.h
scripts/mod/modpost.c
scripts/package/buildtar

diff --combined Makefile
index 86eb6acb3978c81121746356290ca1d7e82d0c4e,fe8ab312402f576159c1b7611b3cd8b218cae760..5d8e7f2583881bcbc8b549dc9e2d3d246498865a
+++ b/Makefile
@@@ -1,8 -1,8 +1,8 @@@
  VERSION = 3
  PATCHLEVEL = 6
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 -NAME = Saber-toothed Squirrel
 +EXTRAVERSION =
 +NAME = Terrified Chipmunk
  
  # *DOCUMENTATION*
  # To see a list of typical targets execute "make help"
@@@ -350,22 -350,12 +350,22 @@@ AFLAGS_KERNEL   
  CFLAGS_GCOV   = -fprofile-arcs -ftest-coverage
  
  
 +# Use USERINCLUDE when you must reference the UAPI directories only.
 +USERINCLUDE    := \
 +              -I$(srctree)/arch/$(hdr-arch)/include/uapi \
 +              -Iarch/$(hdr-arch)/include/generated/uapi \
 +              -I$(srctree)/include/uapi \
 +              -Iinclude/generated/uapi \
 +                -include $(srctree)/include/linux/kconfig.h
 +
  # Use LINUXINCLUDE when you must reference the include/ directory.
  # Needed to be compatible with the O= option
 -LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include \
 -                   -Iarch/$(hdr-arch)/include/generated -Iinclude \
 -                   $(if $(KBUILD_SRC), -I$(srctree)/include) \
 -                   -include $(srctree)/include/linux/kconfig.h
 +LINUXINCLUDE    := \
 +              -I$(srctree)/arch/$(hdr-arch)/include \
 +              -Iarch/$(hdr-arch)/include/generated \
 +              $(if $(KBUILD_SRC), -I$(srctree)/include) \
 +              -Iinclude \
 +              $(USERINCLUDE)
  
  KBUILD_CPPFLAGS := -D__KERNEL__
  
@@@ -447,11 -437,9 +447,11 @@@ asm-generic
  # Detect when mixed targets is specified, and make a second invocation
  # of make so .config is not included in this case either (for *config).
  
 +version_h := include/generated/uapi/linux/version.h
 +
  no-dot-config-targets := clean mrproper distclean \
                         cscope gtags TAGS tags help %docs check% coccicheck \
 -                       include/linux/version.h headers_% archheaders archscripts \
 +                       $(version_h) headers_% archheaders archscripts \
                         kernelversion %src-pkg
  
  config-targets := 0
@@@ -621,11 -609,7 +621,11 @@@ KBUILD_CFLAGS    += $(call cc-option, -fe
  endif
  
  ifdef CONFIG_FUNCTION_TRACER
 -KBUILD_CFLAGS += -pg
 +ifdef CONFIG_HAVE_FENTRY
 +CC_USING_FENTRY       := $(call cc-option, -mfentry -DCC_USING_FENTRY)
 +endif
 +KBUILD_CFLAGS += -pg $(CC_USING_FENTRY)
 +KBUILD_AFLAGS += $(CC_USING_FENTRY)
  ifdef CONFIG_DYNAMIC_FTRACE
        ifdef CONFIG_HAVE_C_RECORDMCOUNT
                BUILD_C_RECORDMCOUNT := y
@@@ -664,22 -648,9 +664,9 @@@ ifeq ($(shell $(CONFIG_SHELL) $(srctree
  endif
  
  # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
- # But warn user when we do so
- warn-assign = \
- $(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)")
- ifneq ($(KCPPFLAGS),)
-         $(call warn-assign,CPPFLAGS)
-         KBUILD_CPPFLAGS += $(KCPPFLAGS)
- endif
- ifneq ($(KAFLAGS),)
-         $(call warn-assign,AFLAGS)
-         KBUILD_AFLAGS += $(KAFLAGS)
- endif
- ifneq ($(KCFLAGS),)
-         $(call warn-assign,CFLAGS)
-         KBUILD_CFLAGS += $(KCFLAGS)
- endif
+ KBUILD_CPPFLAGS += $(KCPPFLAGS)
+ KBUILD_AFLAGS += $(KAFLAGS)
+ KBUILD_CFLAGS += $(KCFLAGS)
  
  # Use --build-id when available.
  LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
@@@ -821,7 -792,7 +808,7 @@@ endi
  # prepare2 creates a makefile if using a separate output directory
  prepare2: prepare3 outputmakefile asm-generic
  
 -prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
 +prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
                     include/config/auto.conf
        $(cmd_crmodverdir)
  
@@@ -854,7 -825,7 +841,7 @@@ define filechk_version.
        echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
  endef
  
 -include/linux/version.h: $(srctree)/Makefile FORCE
 +$(version_h): $(srctree)/Makefile FORCE
        $(call filechk,version.h)
  
  include/generated/utsrelease.h: include/config/kernel.release FORCE
@@@ -899,7 -870,7 +886,7 @@@ PHONY += archscript
  archscripts:
  
  PHONY += __headers
 -__headers: include/linux/version.h scripts_basic asm-generic archheaders archscripts FORCE
 +__headers: $(version_h) scripts_basic asm-generic archheaders archscripts FORCE
        $(Q)$(MAKE) $(build)=scripts build_unifdef
  
  PHONY += headers_install_all
@@@ -908,10 -879,10 +895,10 @@@ headers_install_all
  
  PHONY += headers_install
  headers_install: __headers
 -      $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/asm/Kbuild),, \
 -      $(error Headers not exportable for the $(SRCARCH) architecture))
 -      $(Q)$(MAKE) $(hdr-inst)=include
 -      $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/asm $(hdr-dst)
 +      $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
 +        $(error Headers not exportable for the $(SRCARCH) architecture))
 +      $(Q)$(MAKE) $(hdr-inst)=include/uapi
 +      $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst)
  
  PHONY += headers_check_all
  headers_check_all: headers_install_all
  
  PHONY += headers_check
  headers_check: headers_install
 -      $(Q)$(MAKE) $(hdr-inst)=include HDRCHECK=1
 -      $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/asm $(hdr-dst) HDRCHECK=1
 +      $(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
 +      $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
  
  # ---------------------------------------------------------------------------
  # Modules
@@@ -1009,7 -980,8 +996,7 @@@ CLEAN_DIRS  += $(MODVERDIR
  # Directories & files removed with 'make mrproper'
  MRPROPER_DIRS  += include/config usr/include include/generated          \
                    arch/*/include/generated
 -MRPROPER_FILES += .config .config.old .version .old_version             \
 -                  include/linux/version.h                               \
 +MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
                  Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
  
  # clean - Delete most, but leave enough to build external modules
index 934bc34d5f993892f75c3b803d412b43e62dc072,10ce4fafea64fca386f633138f01a2aeee8a1d46..412bc6c2b02358bd48f87cc0d029bd753dbae613
  #endif
  #endif
  
 +#if __GNUC_MINOR__ >= 6
 +/*
 + * Tell the optimizer that something else uses this function or variable.
 + */
 +#define __visible __attribute__((externally_visible))
 +#endif
 +
  #if __GNUC_MINOR__ > 0
  #define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
  #endif
- #if __GNUC_MINOR__ >= 4 && !defined(__CHECKER__)
+ #if __GNUC_MINOR__ >= 3 && !defined(__CHECKER__)
  #define __compiletime_warning(message) __attribute__((warning(message)))
  #define __compiletime_error(message) __attribute__((error(message)))
  #endif
diff --combined scripts/mod/modpost.c
index 00f7512a217f390ae0673e83fedc76750f0fa22c,cd5803c647fda023d0ea7ba1ca0393dbb71ac111..0d93856a03f4be18a80d85c1c119e362ebd0aa5c
@@@ -821,14 -821,13 +821,15 @@@ static const char *section_white_list[
        ".debug*",
        ".zdebug*",             /* Compressed debug sections. */
        ".GCC-command-line",    /* mn10300 */
+       ".GCC.command.line",    /* record-gcc-switches, non mn10300 */
        ".mdebug*",        /* alpha, score, mips etc. */
        ".pdr",            /* alpha, score, mips etc. */
        ".stab*",
        ".note*",
        ".got*",
        ".toc*",
 +      ".xt.prop",                              /* xtensa */
 +      ".xt.lit",         /* xtensa */
        NULL
  };
  
diff --combined scripts/package/buildtar
index d0d748e72915b2e3217d493c08359739fb6fbf64,632377f9dd32ef957169d2d853b0395a0fde4260..62d8234f87876c30f3c78138db7edbeb0685f8c5
@@@ -28,15 -28,15 +28,15 @@@ case "${1}" i
                file_ext=""
                ;;
        targz-pkg)
-               compress="gzip -c9"
+               compress="gzip"
                file_ext=".gz"
                ;;
        tarbz2-pkg)
-               compress="bzip2 -c9"
+               compress="bzip2"
                file_ext=".bz2"
                ;;
        tarxz-pkg)
-               compress="xz -c9"
+               compress="xz"
                file_ext=".xz"
                ;;
        *)
@@@ -109,7 -109,7 +109,7 @@@ esa
        if tar --owner=root --group=root --help >/dev/null 2>&1; then
                opts="--owner=root --group=root"
        fi
 -      tar cf - . $opts | ${compress} > "${tarball}${file_ext}"
 +      tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
  )
  
  echo "Tarball successfully created in ${tarball}${file_ext}"