From 614a4200841ed2cbd101cdce0966bc291d01642f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 15 Jun 2022 10:41:37 +0200 Subject: kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This uses kernel's generic variable and doesn't require patching it with a custom Makefile change. It's expected *not* to change any behaviour. Signed-off-by: Rafał Miłecki (cherry picked from commit 1d42af720c6b6dcfcdd0b89bce386fca1607dcb3) Signed-off-by: Kevin Darbyshire-Bryant (cherry picked from commit 24e27bec9a6df1511a504cf04cd9578a23e74657) --- .../linux/generic/pending-5.10/201-extra_optimization.patch | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'target/linux') diff --git a/target/linux/generic/pending-5.10/201-extra_optimization.patch b/target/linux/generic/pending-5.10/201-extra_optimization.patch index cb1de807641..dcf39c574ff 100644 --- a/target/linux/generic/pending-5.10/201-extra_optimization.patch +++ b/target/linux/generic/pending-5.10/201-extra_optimization.patch @@ -14,18 +14,12 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -735,11 +735,11 @@ KBUILD_CFLAGS += $(call cc-disable-warni - KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) - - ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE --KBUILD_CFLAGS += -O2 -+KBUILD_CFLAGS += -O2 $(EXTRA_OPTIMIZATION) +@@ -739,7 +739,7 @@ KBUILD_CFLAGS += -O2 else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 --KBUILD_CFLAGS += -O3 -+KBUILD_CFLAGS += -O3 $(EXTRA_OPTIMIZATION) + KBUILD_CFLAGS += -O3 else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os -+KBUILD_CFLAGS += -Os -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION) ++KBUILD_CFLAGS += -Os -fno-reorder-blocks -fno-tree-ch endif # Tell gcc to never replace conditional load with a non-conditional one -- cgit v1.2.3