Skip to contentSkip to conversation

kbuild: Fix optimization level choice default

PATCH Applied Ulf Magnusson 3 participants 3 messages Oct 3, 2017 – Oct 5, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: Fix optimization level choice default

The choice containing the CC_OPTIMIZE_FOR_PERFORMANCE symbol accidentally added a "CONFIG_" prefix when trying to make it the default, selecting an undefined symbol as the default.

The mistake is harmless here: Since the default symbol is not visible, the choice falls back on using the visible symbol as the default instead, which is CC_OPTIMIZE_FOR_PERFORMANCE, as intended.

A patch that makes Kconfig print a warning in this case has been submitted separately:
http://www.spinics.net/lists/linux-kbuild/msg15566.html

---
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -1
index 78cb246..3c1faaa 100644
@@ -1033,7 +1033,7 @@ endif
 
 choice
 	prompt "Compiler optimization level"
-	default CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
+	default CC_OPTIMIZE_FOR_PERFORMANCE
 
 config CC_OPTIMIZE_FOR_PERFORMANCE
 	bool "Optimize for performance"
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ulf Magnusson

The choice containing the CC_OPTIMIZE_FOR_PERFORMANCE symbol accidentally added a "CONFIG_" prefix when trying to make it the default, selecting an undefined symbol as the default.

The mistake is harmless here: Since the default symbol is not visible, the choice falls back on using the visible symbol as the default instead, which is CC_OPTIMIZE_FOR_PERFORMANCE, as intended.

Quoted 5 lines

A patch that makes Kconfig print a warning in this case has been submitted separately:
http://www.spinics.net/lists/linux-kbuild/msg15566.html

#2 lore raw

2017-10-04 16:27 GMT+09:00 Arnd Bergmann <[email protected]>:

Quoted 9 lines · Ulf Magnusson
Quoted 8 lines

The choice containing the CC_OPTIMIZE_FOR_PERFORMANCE symbol accidentally added a "CONFIG_" prefix when trying to make it the default, selecting an undefined symbol as the default.

The mistake is harmless here: Since the default symbol is not visible, the choice falls back on using the visible symbol as the default instead, which is CC_OPTIMIZE_FOR_PERFORMANCE, as intended.

Quoted 8 lines
Quoted 5 lines

A patch that makes Kconfig print a warning in this case has been submitted separately:
http://www.spinics.net/lists/linux-kbuild/msg15566.html

--

Applied to linux-kbuild/fixes. Thanks.

Signature · 2 lines
Best Regards
Masahiro Yamada