--- zzzz-none-000/linux-4.4.60/Makefile 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-1750e-727/linux-4.4.60/Makefile 2021-02-04 17:41:59.000000000 +0000 @@ -377,7 +377,8 @@ -Iarch/$(hdr-arch)/include/generated/uapi \ -I$(srctree)/include/uapi \ -Iinclude/generated/uapi \ - -include $(srctree)/include/linux/kconfig.h + $(USERINCLUDE_AVM_SUBPROJECTS) \ + -include $(srctree)/include/linux/kconfig.h # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option @@ -387,6 +388,7 @@ -Iarch/$(hdr-arch)/include/generated \ $(if $(KBUILD_SRC), -I$(srctree)/include) \ -Iinclude \ + $(LINUXINCLUDE_AVM_SUBPROJECTS) \ $(USERINCLUDE) KBUILD_CPPFLAGS := -D__KERNEL__ @@ -395,6 +397,8 @@ -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration \ -Wno-format-security \ + -Wno-unused-parameter \ + -Wno-sign-compare\ -std=gnu89 $(call cc-option,-fno-PIE) @@ -403,7 +407,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE) KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE -KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds +KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) @@ -621,12 +625,12 @@ KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os +KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION) else ifdef CONFIG_PROFILE_ALL_BRANCHES KBUILD_CFLAGS += -O2 else -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION) endif endif @@ -1603,6 +1607,8 @@ include $(cmd_files) endif +-include $(srctree)/avm/make/generated/linux.make + endif # skip-makefile PHONY += FORCE