Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Aug 2015 13:57:32 +0000 (06:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Aug 2015 13:57:32 +0000 (06:57 -0700)
Pull kbuild fixes from Michal Marek:
 "Two fixes for kbuild:

   - The new ARCH_{CPP,A,C}FLAGS variables are reset before including
     the arch Makefile

   - Fix calling make modules_install twice when module compression is
     enabled"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  Makefile: Force gzip and xz on module install
  kbuild: Do not pick up ARCH_{CPP,A,C}FLAGS from the environment

1  2 
Makefile

diff --combined Makefile
index e79448d90f194be05c2ac9e7f969cb458643c2cc,c5234fe6adb397d1b1a02629c56c06f1853df37f..15d3201052aeea3f8b2554cdd11e979f725bd02c
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 4
  PATCHLEVEL = 2
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 +EXTRAVERSION = -rc5
  NAME = Hurr durr I'ma sheep
  
  # *DOCUMENTATION*
@@@ -597,6 -597,11 +597,11 @@@ endif # $(dot-config
  # Defaults to vmlinux, but the arch makefile usually adds further targets
  all: vmlinux
  
+ # The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
+ # values of the respective KBUILD_* variables
+ ARCH_CPPFLAGS :=
+ ARCH_AFLAGS :=
+ ARCH_CFLAGS :=
  include arch/$(SRCARCH)/Makefile
  
  KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
@@@ -780,11 -785,10 +785,11 @@@ endi
  include scripts/Makefile.kasan
  include scripts/Makefile.extrawarn
  
 -# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
 -KBUILD_CPPFLAGS += $(KCPPFLAGS)
 -KBUILD_AFLAGS += $(KAFLAGS)
 -KBUILD_CFLAGS += $(KCFLAGS)
 +# Add any arch overrides and user supplied CPPFLAGS, AFLAGS and CFLAGS as the
 +# last assignments
 +KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
 +KBUILD_AFLAGS   += $(ARCH_AFLAGS)   $(KAFLAGS)
 +KBUILD_CFLAGS   += $(ARCH_CFLAGS)   $(KCFLAGS)
  
  # Use --build-id when available.
  LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
@@@ -848,10 -852,10 +853,10 @@@ export mod_strip_cm
  mod_compress_cmd = true
  ifdef CONFIG_MODULE_COMPRESS
    ifdef CONFIG_MODULE_COMPRESS_GZIP
-     mod_compress_cmd = gzip -n
+     mod_compress_cmd = gzip -n -f
    endif # CONFIG_MODULE_COMPRESS_GZIP
    ifdef CONFIG_MODULE_COMPRESS_XZ
-     mod_compress_cmd = xz
+     mod_compress_cmd = xz -f
    endif # CONFIG_MODULE_COMPRESS_XZ
  endif # CONFIG_MODULE_COMPRESS
  export mod_compress_cmd