[RFC,v1,1/2] kbuild: add arch specific dependency for BTF support
diff mbox series

Message ID 20200127193549.187419-2-brendanhiggins@google.com
State New
Headers show
Series
  • arch: um: turn BTF_TYPEINFO support off
Related show

Commit Message

Brendan Higgins Jan. 27, 2020, 7:35 p.m. UTC
Some archs (like UM) do not build with CONFIG_DEBUG_INFO_BTF=y, so add
an options for archs to select to opt-in or out of BTF typeinfo support.

Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
---
 lib/Kconfig.debug | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Masahiro Yamada Jan. 28, 2020, 3:27 a.m. UTC | #1
Hi.

On Tue, Jan 28, 2020 at 4:36 AM Brendan Higgins
<brendanhiggins@google.com> wrote:
>
> Some archs (like UM) do not build with CONFIG_DEBUG_INFO_BTF=y, so add
> an options for archs to select to opt-in or out of BTF typeinfo support.


Could you use a different subject prefix (e.g. "btf:") ?

This is unrelated to kbuild.

Thanks.


> Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
> ---
>  lib/Kconfig.debug | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index e4676b992eae9..f5bcb391f1b7d 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -238,9 +238,12 @@ config DEBUG_INFO_DWARF4
>           But it significantly improves the success of resolving
>           variables in gdb on optimized code.
>
> +config ARCH_NO_BTF_TYPEINFO
> +       bool
> +
>  config DEBUG_INFO_BTF
>         bool "Generate BTF typeinfo"
> -       depends on DEBUG_INFO
> +       depends on DEBUG_INFO && !ARCH_NO_BTF_TYPEINFO
>         help
>           Generate deduplicated BTF type information from DWARF debug info.
>           Turning this on expects presence of pahole tool, which will convert
> --
> 2.25.0.341.g760bfbb309-goog
>
Brendan Higgins Jan. 28, 2020, 7:25 a.m. UTC | #2
On Mon, Jan 27, 2020 at 7:28 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Hi.
>
> On Tue, Jan 28, 2020 at 4:36 AM Brendan Higgins
> <brendanhiggins@google.com> wrote:
> >
> > Some archs (like UM) do not build with CONFIG_DEBUG_INFO_BTF=y, so add
> > an options for archs to select to opt-in or out of BTF typeinfo support.
>
>
> Could you use a different subject prefix (e.g. "btf:") ?
>
> This is unrelated to kbuild.

Sure. My apologies, I just used the kbuild subject prefix because
that's what the previous commit that touched BTF used. Will fix in
next revision.

Thanks!

> > Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
> > ---
> >  lib/Kconfig.debug | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > index e4676b992eae9..f5bcb391f1b7d 100644
> > --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -238,9 +238,12 @@ config DEBUG_INFO_DWARF4
> >           But it significantly improves the success of resolving
> >           variables in gdb on optimized code.
> >
> > +config ARCH_NO_BTF_TYPEINFO
> > +       bool
> > +
> >  config DEBUG_INFO_BTF
> >         bool "Generate BTF typeinfo"
> > -       depends on DEBUG_INFO
> > +       depends on DEBUG_INFO && !ARCH_NO_BTF_TYPEINFO
> >         help
> >           Generate deduplicated BTF type information from DWARF debug info.
> >           Turning this on expects presence of pahole tool, which will convert
> > --
> > 2.25.0.341.g760bfbb309-goog
> >
>
>
> --
> Best Regards
> Masahiro Yamada

Patch
diff mbox series

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e4676b992eae9..f5bcb391f1b7d 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -238,9 +238,12 @@  config DEBUG_INFO_DWARF4
 	  But it significantly improves the success of resolving
 	  variables in gdb on optimized code.
 
+config ARCH_NO_BTF_TYPEINFO
+	bool
+
 config DEBUG_INFO_BTF
 	bool "Generate BTF typeinfo"
-	depends on DEBUG_INFO
+	depends on DEBUG_INFO && !ARCH_NO_BTF_TYPEINFO
 	help
 	  Generate deduplicated BTF type information from DWARF debug info.
 	  Turning this on expects presence of pahole tool, which will convert