diff mbox

kbuild: Fix optimization level choice default

Message ID 1507074806-21577-1-git-send-email-ulfalizer@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ulf Magnusson Oct. 3, 2017, 11:53 p.m. UTC
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

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
---
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arnd Bergmann Oct. 4, 2017, 7:27 a.m. UTC | #1
On Wed, Oct 4, 2017 at 1:53 AM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
> 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
>
> Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Masahiro Yamada Oct. 5, 2017, 8:04 p.m. UTC | #2
2017-10-04 16:27 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> On Wed, Oct 4, 2017 at 1:53 AM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
>> 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
>>
>> Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> --


Applied to linux-kbuild/fixes.  Thanks.
diff mbox

Patch

diff --git a/init/Kconfig b/init/Kconfig
index 78cb246..3c1faaa 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -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"