OSDN Git Service

soc/qcom: move icnss_initialize to async probe
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / Makefile
index 3e2a33b..c4c981b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 206
-EXTRAVERSION = -rc1
+SUBLEVEL = 207
+EXTRAVERSION =
 NAME = Blurry Fish Butt
 
 # *DOCUMENTATION*
@@ -628,6 +628,7 @@ CLANG_GCC_TC        := --gcc-toolchain=$(GCC_TOOLCHAIN)
 endif
 KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
 KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
+KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
 KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
 endif
 
@@ -658,6 +659,29 @@ ARCH_AFLAGS :=
 ARCH_CFLAGS :=
 include arch/$(SRCARCH)/Makefile
 
+ifeq ($(cc-name),clang)
+KBUILD_CFLAGS  += -O3
+KBUILD_CFLAGS  += $(call cc-option, -mllvm -polly) \
+                  $(call cc-option, -mllvm -polly-run-dce) \
+                  $(call cc-option, -mllvm -polly-run-inliner) \
+                  $(call cc-option, -mllvm -polly-opt-fusion=max) \
+                  $(call cc-option, -mllvm -polly-ast-use-context) \
+                  $(call cc-option, -mllvm -polly-detect-keep-going) \
+                  $(call cc-option, -mllvm -polly-vectorizer=stripmine) \
+                  $(call cc-option, -mllvm -polly-invariant-load-hoisting)
+else
+KBUILD_CFLAGS  += -O2
+endif
+
+ifeq ($(cc-name),gcc)
+KBUILD_CFLAGS  += -mcpu=cortex-a73.cortex-a53
+KBUILD_AFLAGS  += -mcpu=cortex-a73.cortex-a53
+endif
+ifeq ($(cc-name),clang)
+KBUILD_CFLAGS  += -mcpu=cortex-a53
+KBUILD_AFLAGS  += -mcpu=cortex-a53
+endif
+
 KBUILD_CFLAGS  += $(call cc-option,-fno-delete-null-pointer-checks,)
 KBUILD_CFLAGS  += $(call cc-disable-warning,maybe-uninitialized,)
 KBUILD_CFLAGS  += $(call cc-disable-warning,frame-address,)
@@ -667,16 +691,6 @@ KBUILD_CFLAGS      += $(call cc-disable-warning, int-in-bool-context)
 KBUILD_CFLAGS  += $(call cc-disable-warning, address-of-packed-member)
 KBUILD_CFLAGS  += $(call cc-disable-warning, attribute-alias)
 
-ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS  += -Os
-else
-ifdef CONFIG_PROFILE_ALL_BRANCHES
-KBUILD_CFLAGS  += -O2
-else
-KBUILD_CFLAGS   += -O2
-endif
-endif
-
 ifdef CONFIG_CC_WERROR
 KBUILD_CFLAGS  += -Werror
 endif
@@ -780,6 +794,11 @@ KBUILD_CFLAGS      += -fomit-frame-pointer
 endif
 endif
 
+# Initialize all stack variables with a pattern, if desired.
+ifdef CONFIG_INIT_STACK_ALL
+KBUILD_CFLAGS  += $(call cc-option, -ftrivial-auto-var-init=pattern)
+endif
+
 KBUILD_CFLAGS   += $(call cc-option, -fno-var-tracking-assignments)
 
 ifdef CONFIG_DEBUG_INFO
@@ -1512,9 +1531,6 @@ else # KBUILD_EXTMOD
 
 # We are always building modules
 KBUILD_MODULES := 1
-PHONY += crmodverdir
-crmodverdir:
-       $(cmd_crmodverdir)
 
 PHONY += $(objtree)/Module.symvers
 $(objtree)/Module.symvers:
@@ -1526,7 +1542,7 @@ $(objtree)/Module.symvers:
 
 module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
 PHONY += $(module-dirs) modules
-$(module-dirs): crmodverdir $(objtree)/Module.symvers
+$(module-dirs): prepare $(objtree)/Module.symvers
        $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
 
 modules: $(module-dirs)
@@ -1566,7 +1582,8 @@ help:
 
 # Dummies...
 PHONY += prepare scripts
-prepare: ;
+prepare:
+       $(cmd_crmodverdir)
 scripts: ;
 endif # KBUILD_EXTMOD
 
@@ -1691,17 +1708,14 @@ endif
 
 # Modules
 /: prepare scripts FORCE
-       $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
 # Make sure the latest headers are built for Documentation
 Documentation/: headers_install
 %/: prepare scripts FORCE
-       $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
 %.ko: prepare scripts FORCE
-       $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
        $(build)=$(build-dir) $(@:.ko=.o)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost