diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2022-06-15 10:41:37 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2022-07-08 15:38:42 +0200 |
commit | 44fa330a8254893ec81e5b3df16299f32a0f053f (patch) | |
tree | 5d77b7253bdd68636981150cdec509ea4ccdea13 /target/linux/generic | |
parent | bd84d517eb95df96d6e9dccac387a135a6cc4065 (diff) | |
download | upstream-44fa330a8254893ec81e5b3df16299f32a0f053f.tar.gz upstream-44fa330a8254893ec81e5b3df16299f32a0f053f.tar.bz2 upstream-44fa330a8254893ec81e5b3df16299f32a0f053f.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>
(cherry picked from commit 1d42af720c6b6dcfcdd0b89bce386fca1607dcb3)
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 24e27bec9a6df1511a504cf04cd9578a23e74657)
Diffstat (limited to 'target/linux/generic')
-rw-r--r-- | target/linux/generic/pending-5.4/201-extra_optimization.patch | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/target/linux/generic/pending-5.4/201-extra_optimization.patch b/target/linux/generic/pending-5.4/201-extra_optimization.patch index c606487992..4395a3e6a7 100644 --- a/target/linux/generic/pending-5.4/201-extra_optimization.patch +++ b/target/linux/generic/pending-5.4/201-extra_optimization.patch @@ -14,18 +14,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/Makefile +++ b/Makefile -@@ -719,11 +719,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) +@@ -723,7 +723,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 |