Update Makefile

This commit is contained in:
Phapoom Saksri 2025-05-22 22:11:26 +07:00 committed by GitHub
parent f84608f9a5
commit e82f86e8f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -743,19 +743,14 @@ include/config/auto.conf:
endif # may-sync-config
endif # need-config
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += -O2
else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
KBUILD_CFLAGS += -O3
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
endif
# Force high-performance optimizations for Android kernel
KBUILD_CFLAGS += -Ofast -fno-stack-protector -fno-plt -fomit-frame-pointer -funroll-loops
# Tell gcc to never replace conditional load with a non-conditional one
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)