lkml.org 
[lkml]   [2019]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 4/4] gcov: clang: pick GCC vs Clang format depending on compiler
On Mon, Jan 14, 2019 at 5:25 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> On Tue, Jan 15, 2019 at 6:07 AM Tri Vo <trong@android.com> wrote:
> >
> > Clang gcov format is only supported by Clang compiler, and Clang
> > compiler only supports Clang format.
>
>
> If so, what is the point of putting GCOV_FORMAT_CLANG into the
> choice menu?
>
>
> You can choose the format only when you are using GCC.
>
> I think the following is more sensible:
>
>
> if GCOV_KERNEL
>
> config GCOV_PROFILE_ALL
> ....
>
>
> choice
> prompt "Specify GCOV format for GCC"
> depends on CC_IS_GCC
> ...
>
> config GCOV_FORMAT_3_4
> bool "GCC 3.4 format"
> depends on GCC_VERSION < 40700
> ...
>
> config GCOV_FORMAT_4_7
> bool "GCC 4.7 format"
> ...
>
> endchoice
>
>
> config GCOV_FORMAT_CLANG
> def_bool CC_IS_CLANG
>
> endif
>
>
>
>
>
> Or, you can delete GCOV_FORMAT_CLANG
> if you write the Makefile like follows:
>
>
>
> obj-y := base.o fs.o
> obj-$(CONFIG_GCOV_FORMAT_3_4) += gcc_base.o gcc_3_4.o
> obj-$(CONFIG_GCOV_FORMAT_4_7) += gcc_base.o gcc_4_7.o
> obj-$(CONFIG_CC_IS_CLANG) += clang.o

Thanks for the suggestion! It is more sensible than the current
approach. I'll send an update.

\
 
 \ /
  Last update: 2019-01-15 18:53    [W:0.046 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site