2024-12-10 00:17:37 +03:00
|
|
|
From 1fc1195e784540ad1966b57267fc927a87c5d21d Mon Sep 17 00:00:00 2001
|
2024-10-29 05:12:06 +03:00
|
|
|
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
|
|
|
Date: Sun, 11 Dec 2022 23:51:16 +0100
|
|
|
|
Subject: ZEN: Restore CONFIG_OPTIMIZE_FOR_PERFORMANCE_O3
|
|
|
|
|
|
|
|
This reverts a6036a41bffba3d5007e377483b425d470ad8042 (kbuild: drop
|
|
|
|
support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3), removes the
|
|
|
|
dependency on CONFIG_ARC and adds RUSTFLAGS.
|
|
|
|
---
|
|
|
|
Makefile | 3 +++
|
|
|
|
init/Kconfig | 6 ++++++
|
|
|
|
2 files changed, 9 insertions(+)
|
|
|
|
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2024-12-10 00:17:37 +03:00
|
|
|
@@ -812,6 +812,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe
|
2024-10-29 05:12:06 +03:00
|
|
|
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
|
|
|
KBUILD_CFLAGS += -O2
|
|
|
|
KBUILD_RUSTFLAGS += -Copt-level=2
|
|
|
|
+else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
|
|
|
+KBUILD_CFLAGS += -O3
|
|
|
|
+KBUILD_RUSTFLAGS += -Copt-level=3
|
|
|
|
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
|
|
|
KBUILD_CFLAGS += -Os
|
|
|
|
KBUILD_RUSTFLAGS += -Copt-level=s
|
|
|
|
--- a/init/Kconfig
|
|
|
|
+++ b/init/Kconfig
|
2024-12-10 00:17:37 +03:00
|
|
|
@@ -1451,6 +1451,12 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
|
2024-10-29 05:12:06 +03:00
|
|
|
with the "-O2" compiler flag for best performance and most
|
|
|
|
helpful compile-time warnings.
|
|
|
|
|
|
|
|
+config CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
|
|
|
+ bool "Optimize more for performance (-O3)"
|
|
|
|
+ help
|
|
|
|
+ Choosing this option will pass "-O3" to your compiler to optimize
|
|
|
|
+ the kernel yet more for performance.
|
|
|
|
+
|
|
|
|
config CC_OPTIMIZE_FOR_SIZE
|
|
|
|
bool "Optimize for size (-Os)"
|
|
|
|
help
|