From 2eb465047f778739c8b53826d5f7b274fb61f65d Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 22 May 2011 14:30:36 -0700 Subject: [PATCH] Give up on pushing CC_OPTIMIZE_FOR_SIZE I still happen to believe that I$ miss costs are a major thing, but sadly, -Os doesn't seem to be the solution. With or without it, gcc will miss some obvious code size improvements, and with it enabled gcc will sometimes make choices that aren't good even with high I$ miss ratios. For example, with -Os, gcc on x86 will turn a 20-byte constant memcpy into a "rep movsl". While I sincerely hope that x86 CPU's will some day do a good job at that, they certainly don't do it yet, and the cost is higher than a L1 I$ miss would be. Some day I hope we can re-enable this. Signed-off-by: Linus Torvalds --- init/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index 4986ecc49e656..ffcdad793f14d 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -908,7 +908,6 @@ endif config CC_OPTIMIZE_FOR_SIZE bool "Optimize for size" - default y help Enabling this option will pass "-Os" instead of "-O2" to gcc resulting in a smaller kernel. -- 2.39.5