* [PATCH] init/Kconfig: make CC_OPTIMIZE_FOR_DEBUGGING visible only for GCC
@ 2018-11-05 15:17 Changbin Du
2018-11-09 15:03 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Changbin Du @ 2018-11-05 15:17 UTC (permalink / raw)
To: yamada.masahiro; +Cc: arnd, linux-kernel, linux-kbuild, Changbin Du
Currently CC_OPTIMIZE_FOR_DEBUGGING is only able to build with GCC.
For clang, -Og optimization level could break kernel build. So make
CC_OPTIMIZE_FOR_DEBUGGING visible only for GCC.
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Changbin Du <changbin.du@gmail.com>
---
init/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/init/Kconfig b/init/Kconfig
index 0fb9c0b5f1a1..d5fb0ee1400a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1107,6 +1107,7 @@ config CC_OPTIMIZE_FOR_SIZE
config CC_OPTIMIZE_FOR_DEBUGGING
bool "Optimize for better debugging experience (-Og)"
+ depends on CC_IS_GCC
depends on $(cc-option,-Og)
select NO_AUTO_INLINE
help
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] init/Kconfig: make CC_OPTIMIZE_FOR_DEBUGGING visible only for GCC
2018-11-05 15:17 [PATCH] init/Kconfig: make CC_OPTIMIZE_FOR_DEBUGGING visible only for GCC Changbin Du
@ 2018-11-09 15:03 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2018-11-09 15:03 UTC (permalink / raw)
To: Changbin Du
Cc: Arnd Bergmann, Linux Kernel Mailing List, Linux Kbuild mailing list
On Tue, Nov 6, 2018 at 12:18 AM Changbin Du <changbin.du@gmail.com> wrote:
>
> Currently CC_OPTIMIZE_FOR_DEBUGGING is only able to build with GCC.
> For clang, -Og optimization level could break kernel build. So make
> CC_OPTIMIZE_FOR_DEBUGGING visible only for GCC.
>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
> ---
I squashed this into the previous patch in the kbuild tree.
Thanks!
> init/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index 0fb9c0b5f1a1..d5fb0ee1400a 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1107,6 +1107,7 @@ config CC_OPTIMIZE_FOR_SIZE
>
> config CC_OPTIMIZE_FOR_DEBUGGING
> bool "Optimize for better debugging experience (-Og)"
> + depends on CC_IS_GCC
> depends on $(cc-option,-Og)
> select NO_AUTO_INLINE
> help
> --
> 2.17.1
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-09 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 15:17 [PATCH] init/Kconfig: make CC_OPTIMIZE_FOR_DEBUGGING visible only for GCC Changbin Du
2018-11-09 15:03 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).