--- zzzz-none-000/linux-5.4.213/Makefile 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/Makefile 2024-05-29 11:19:50.000000000 +0000 @@ -465,7 +465,8 @@ -I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \ -I$(srctree)/include/uapi \ -I$(objtree)/include/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 @@ -474,6 +475,7 @@ -I$(objtree)/arch/$(SRCARCH)/include/generated \ $(if $(building_out_of_srctree),-I$(srctree)/include) \ -I$(objtree)/include \ + $(LINUXINCLUDE_AVM_SUBPROJECTS) \ $(USERINCLUDE) KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE @@ -481,6 +483,9 @@ -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ -Werror=implicit-function-declaration -Werror=implicit-int \ -Werror=return-type -Wno-format-security \ + -Wno-unused-parameter \ + -Wno-sign-compare \ + -Wno-error=cpp \ -std=gnu89 KBUILD_CPPFLAGS := -D__KERNEL__ KBUILD_AFLAGS_KERNEL := @@ -719,11 +724,11 @@ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O2 $(EXTRA_OPTIMIZATION) else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 -KBUILD_CFLAGS += -O3 +KBUILD_CFLAGS += -O3 $(EXTRA_OPTIMIZATION) else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os +KBUILD_CFLAGS += -Os -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION) endif # Tell gcc to never replace conditional load with a non-conditional one @@ -1229,6 +1234,7 @@ $(error Headers not exportable for the $(SRCARCH) architecture)) $(Q)$(MAKE) $(hdr-inst)=include/uapi $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi + $(Q)$(MAKE) lisi-headers # Deprecated. It is no-op now. PHONY += headers_check @@ -1858,6 +1864,7 @@ existing-targets := $(wildcard $(sort $(targets))) -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) +-include $(srctree)/avm/make/generated/linux.make endif # config-targets endif # mixed-build