From 1fc1195e784540ad1966b57267fc927a87c5d21d Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" 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 @@ -813,6 +813,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe 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 @@ -1451,6 +1451,12 @@ config CC_OPTIMIZE_FOR_PERFORMANCE 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