Commit ae3e4628287de0ab90545c14076657aeee38506b

Authored by Linus Torvalds

Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

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

Showing 6 changed files Side-by-side Diff

... ... @@ -664,22 +664,9 @@
664 664 endif
665 665  
666 666 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
667   -# But warn user when we do so
668   -warn-assign = \
669   -$(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)")
670   -
671   -ifneq ($(KCPPFLAGS),)
672   - $(call warn-assign,CPPFLAGS)
673   - KBUILD_CPPFLAGS += $(KCPPFLAGS)
674   -endif
675   -ifneq ($(KAFLAGS),)
676   - $(call warn-assign,AFLAGS)
677   - KBUILD_AFLAGS += $(KAFLAGS)
678   -endif
679   -ifneq ($(KCFLAGS),)
680   - $(call warn-assign,CFLAGS)
681   - KBUILD_CFLAGS += $(KCFLAGS)
682   -endif
  667 +KBUILD_CPPFLAGS += $(KCPPFLAGS)
  668 +KBUILD_AFLAGS += $(KAFLAGS)
  669 +KBUILD_CFLAGS += $(KCFLAGS)
683 670  
684 671 # Use --build-id when available.
685 672 LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
include/linux/compiler-gcc4.h
... ... @@ -59,7 +59,7 @@
59 59 #if __GNUC_MINOR__ > 0
60 60 #define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
61 61 #endif
62   -#if __GNUC_MINOR__ >= 4 && !defined(__CHECKER__)
  62 +#if __GNUC_MINOR__ >= 3 && !defined(__CHECKER__)
63 63 #define __compiletime_warning(message) __attribute__((warning(message)))
64 64 #define __compiletime_error(message) __attribute__((error(message)))
65 65 #endif
scripts/Makefile.modinst
... ... @@ -9,7 +9,7 @@
9 9  
10 10 #
11 11  
12   -__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
  12 +__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
13 13 modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))
14 14  
15 15 PHONY += $(modules)
scripts/Makefile.modpost
... ... @@ -60,7 +60,7 @@
60 60 modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers
61 61  
62 62 # Step 1), find all modules listed in $(MODVERDIR)/
63   -__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
  63 +__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
64 64 modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
65 65  
66 66 # Stop after building .o files if NOFINAL is set. Makes compile tests quicker
scripts/mod/modpost.c
... ... @@ -821,6 +821,7 @@
821 821 ".debug*",
822 822 ".zdebug*", /* Compressed debug sections. */
823 823 ".GCC-command-line", /* mn10300 */
  824 + ".GCC.command.line", /* record-gcc-switches, non mn10300 */
824 825 ".mdebug*", /* alpha, score, mips etc. */
825 826 ".pdr", /* alpha, score, mips etc. */
826 827 ".stab*",
scripts/package/buildtar
... ... @@ -28,15 +28,15 @@
28 28 file_ext=""
29 29 ;;
30 30 targz-pkg)
31   - compress="gzip -c9"
  31 + compress="gzip"
32 32 file_ext=".gz"
33 33 ;;
34 34 tarbz2-pkg)
35   - compress="bzip2 -c9"
  35 + compress="bzip2"
36 36 file_ext=".bz2"
37 37 ;;
38 38 tarxz-pkg)
39   - compress="xz -c9"
  39 + compress="xz"
40 40 file_ext=".xz"
41 41 ;;
42 42 *)