diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2022-06-15 10:41:37 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2022-06-19 23:23:18 +0200 |
commit | 1d42af720c6b6dcfcdd0b89bce386fca1607dcb3 (patch) | |
tree | 9f8048b45b47879acf37844e2a3c235bd11c031b /target | |
parent | 77692d6112074f969170ec3c9b353df6565bc1c3 (diff) | |
download | upstream-1d42af720c6b6dcfcdd0b89bce386fca1607dcb3.tar.gz upstream-1d42af720c6b6dcfcdd0b89bce386fca1607dcb3.tar.bz2 upstream-1d42af720c6b6dcfcdd0b89bce386fca1607dcb3.zip |
kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags
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 <rafal@milecki.pl>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/pending-5.10/201-extra_optimization.patch | 12 | ||||
-rw-r--r-- | target/linux/generic/pending-5.15/201-extra_optimization.patch | 12 |
2 files changed, 6 insertions, 18 deletions
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 cb1de80764..dcf39c574f 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 <nbd@nbd.name> --- 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 diff --git a/target/linux/generic/pending-5.15/201-extra_optimization.patch b/target/linux/generic/pending-5.15/201-extra_optimization.patch index 5300a5c4ab..96e93dde9b 100644 --- a/target/linux/generic/pending-5.15/201-extra_optimization.patch +++ b/target/linux/generic/pending-5.15/201-extra_optimization.patch @@ -14,18 +14,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/Makefile +++ b/Makefile -@@ -752,11 +752,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) +@@ -756,7 +756,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 |