summaryrefslogtreecommitdiffstats
path: root/init/Kconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-08-20 13:09:40 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-09-03 21:01:17 -0400
commit15f5db60a13748f44e5a14a2573c2cfcdc152f1c (patch)
tree7123e2a44a2aa4d377c2f65f0c5bd16a7283ffb8 /init/Kconfig
parente2079e93f562c7f7a030eb7642017ee5eabaaa10 (diff)
kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC
arch/arc/Makefile overrides -O2 with -O3. This is the only user of ARCH_CFLAGS. There is no user of ARCH_CPPFLAGS or ARCH_AFLAGS. My plan is to remove ARCH_{CPP,A,C}FLAGS after refactoring the ARC Makefile. Currently, ARC has no way to enable -Wmaybe-uninitialized because both -O3 and -Os disable it. Enabling it will be useful for compile-testing. This commit allows allmodconfig (, which defaults to -O2) to enable it. Add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y to all the defconfig files in arch/arc/configs/ in order to keep the current config settings. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'init/Kconfig')
-rw-r--r--init/Kconfig12
1 files changed, 10 insertions, 2 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 149efd82447f..92118505dd33 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1209,14 +1209,22 @@ choice
1209 default CC_OPTIMIZE_FOR_PERFORMANCE 1209 default CC_OPTIMIZE_FOR_PERFORMANCE
1210 1210
1211config CC_OPTIMIZE_FOR_PERFORMANCE 1211config CC_OPTIMIZE_FOR_PERFORMANCE
1212 bool "Optimize for performance" 1212 bool "Optimize for performance (-O2)"
1213 help 1213 help
1214 This is the default optimization level for the kernel, building 1214 This is the default optimization level for the kernel, building
1215 with the "-O2" compiler flag for best performance and most 1215 with the "-O2" compiler flag for best performance and most
1216 helpful compile-time warnings. 1216 helpful compile-time warnings.
1217 1217
1218config CC_OPTIMIZE_FOR_PERFORMANCE_O3
1219 bool "Optimize more for performance (-O3)"
1220 depends on ARC
1221 imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED # avoid false positives
1222 help
1223 Choosing this option will pass "-O3" to your compiler to optimize
1224 the kernel yet more for performance.
1225
1218config CC_OPTIMIZE_FOR_SIZE 1226config CC_OPTIMIZE_FOR_SIZE
1219 bool "Optimize for size" 1227 bool "Optimize for size (-Os)"
1220 imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED # avoid false positives 1228 imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED # avoid false positives
1221 help 1229 help
1222 Choosing this option will pass "-Os" to your compiler resulting 1230 Choosing this option will pass "-Os" to your compiler resulting