VERSION = 4
PATCHLEVEL = 9
-SUBLEVEL = 312
+SUBLEVEL = 337
EXTRAVERSION =
NAME = Roaring Lionus
-fno-strict-aliasing -fno-common -fshort-wchar \
-Werror-implicit-function-declaration \
-Wno-format-security \
- -std=gnu89
+ -Werror \
+ -std=gnu89 $(call cc-option,-fno-PIE)
+
+
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
+KERNELRELEASE_FULL = $(shell cat include/config/kernel.release_full 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
scripts_basic:
$(Q)$(MAKE) $(build)=scripts/basic
$(Q)rm -f .tmp_quiet_recordmcount
+ $(Q)if [ -d $(srctree)/.git/hooks ]; then \
+ cp $(srctree)/scripts/amlogic/pre-commit $(srctree)/.git/hooks/; \
+ chmod +x $(srctree)/.git/hooks/pre-commit; \
+ fi
+#$(Q)mkdir -p $(srctree)/.git/hooks
# To avoid any implicit rule to kick in, define an empty command.
scripts/basic/%: scripts_basic ;
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
-CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
+CFLAGS_GCOV := -fprofile-arcs -ftest-coverage \
+ $(call cc-option,-fno-tree-loop-im) \
+ $(call cc-disable-warning,maybe-uninitialized,)
CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
export CFLAGS_GCOV CFLAGS_KCOV
endif
ifdef CONFIG_CFI_CLANG
-cfi-clang-flags += -fsanitize=cfi
+cfi-clang-flags += -fsanitize=cfi $(call cc-option, -fsplit-lto-unit)
DISABLE_CFI_CLANG := -fno-sanitize=cfi
ifdef CONFIG_MODULES
cfi-clang-flags += -fsanitize-cfi-cross-dso
stackp-flag := -fstack-protector
stackp-name := REGULAR
else
-ifdef CONFIG_CC_STACKPROTECTOR_STRONG
+ifdef CONFIG_CC_STACKPROTECTOR_STRONG_AMLOGIC
stackp-flag := -fstack-protector-strong
stackp-name := STRONG
else
$(Q)$(MAKE) $(build)=$@
define filechk_kernel.release
+ echo "$(KERNELVERSION)"
+endef
+
+define filechk_kernel.release_full
echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
endef
+
# Store (new) KERNELRELEASE string in include/config/kernel.release
include/config/kernel.release: include/config/auto.conf FORCE
$(call filechk,kernel.release)
+include/config/kernel.release_full: include/config/auto.conf FORCE
+ $(call filechk,kernel.release_full)
+
# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".
# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
# 1) Check that make has not been executed in the kernel src $(srctree)
-prepare3: include/config/kernel.release
+prepare3: include/config/kernel.release include/config/kernel.release_full
ifneq ($(KBUILD_SRC),)
@$(kecho) ' Using $(srctree) as source for kernel'
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
echo '"$(UTS_RELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \
- (echo \#define UTS_RELEASE \"$(UTS_RELEASE)\";)
+ (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; echo \#define UTS_RELEASE_FULL \"$(KERNELRELEASE_FULL)\";)
endef
define filechk_version.h
$(call filechk,version.h)
$(Q)rm -f $(old_version_h)
-include/generated/utsrelease.h: include/config/kernel.release FORCE
+include/generated/utsrelease.h: include/config/kernel.release include/config/kernel.release_full FORCE
$(call filechk,utsrelease.h)
PHONY += headerdep