lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Jan 2019 11:25:00 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Tri Vo <trong@...roid.com>
Cc:     oberpar@...ux.ibm.com, Greg Hackmann <ghackmann@...roid.com>,
        LKML <linux-kernel@...r.kernel.org>, kernel-team@...roid.com,
        Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: Re: [PATCH v2 4/4] gcov: clang: pick GCC vs Clang format depending on compiler

+ Masahiro

On Tue, Jan 15, 2019 at 10:37 AM Tri Vo <trong@...roid.com> wrote:
>
> From: Tri Vo <trong@...roid.com>
>
> Clang gcov format is only supported by Clang compiler, and Clang
> compiler only supports Clang format.
>
> We set gcov format to depend on which compiler (GCC or Clang) is used.
>
> Automatic format detection behavior is preserved because:
> If GCC is used, one of the GCC gcov formats is selected.
> If Clang is used, Clang gcov format is selected.
>
> Signed-off-by: Tri Vo <trong@...roid.com>
> ---
>  kernel/gcov/Kconfig  | 8 ++------
>  kernel/gcov/Makefile | 2 +-
>  2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig
> index eb428e570923..f71c1adcff31 100644
> --- a/kernel/gcov/Kconfig
> +++ b/kernel/gcov/Kconfig
> @@ -53,6 +53,7 @@ config GCOV_PROFILE_ALL
>  choice
>         prompt "Specify GCOV format"
>         depends on GCOV_KERNEL
> +       depends on CC_IS_GCC
>         ---help---
>         The gcov format is usually determined by the GCC version, and the
>         default is chosen according to your GCC version. However, there are
> @@ -62,7 +63,7 @@ choice
>
>  config GCOV_FORMAT_3_4
>         bool "GCC 3.4 format"
> -       depends on CC_IS_GCC && GCC_VERSION < 40700
> +       depends on GCC_VERSION < 40700
>         ---help---
>         Select this option to use the format defined by GCC 3.4.
>
> @@ -71,11 +72,6 @@ config GCOV_FORMAT_4_7
>         ---help---
>         Select this option to use the format defined by GCC 4.7.
>
> -config GCOV_FORMAT_CLANG
> -       bool "Clang format"
> -       ---help---
> -       Select this option to use the format defined by Clang.
> -
>  endchoice
>
>  endmenu
> diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile
> index 83da4765c18d..d66a74b0f100 100644
> --- a/kernel/gcov/Makefile
> +++ b/kernel/gcov/Makefile
> @@ -4,4 +4,4 @@ ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"'
>  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_GCOV_FORMAT_CLANG) += clang.o
> +obj-$(CONFIG_CC_IS_CLANG) += clang.o

I think this was the suggestion from Masahiro from v1?
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists