From: Tri Vo <trong@android.com>
To: oberpar@linux.ibm.com
Cc: ghackmann@android.com, ndesaulniers@google.com,
linux-kernel@vger.kernel.org, kernel-team@android.com,
Tri Vo <trong@android.com>
Subject: [PATCH v2 4/4] gcov: clang: pick GCC vs Clang format depending on compiler
Date: Tue, 15 Jan 2019 10:36:43 -0800 [thread overview]
Message-ID: <20190115183643.120619-5-trong@google.com> (raw)
In-Reply-To: <20190115183643.120619-1-trong@google.com>
From: Tri Vo <trong@android.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@android.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
--
2.20.1.97.g81188d93c3-goog
next prev parent reply other threads:[~2019-01-15 18:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 18:36 [PATCH v2 0/4] gcov: add Clang support Tri Vo
2019-01-15 18:36 ` [PATCH v2 1/4] gcov: clang: move common gcc code into gcc_base.c Tri Vo
2019-01-15 18:36 ` [PATCH v2 2/4] gcov: clang support Tri Vo
2019-01-15 18:36 ` [PATCH v2 3/4] gcov: clang: link/unlink profiling data set Tri Vo
2019-01-15 18:36 ` Tri Vo [this message]
2019-01-15 19:25 ` [PATCH v2 4/4] gcov: clang: pick GCC vs Clang format depending on compiler Nick Desaulniers
2019-01-16 10:18 ` Masahiro Yamada
2019-01-17 21:48 ` Nick Desaulniers
2019-01-16 15:17 ` [PATCH v2 0/4] gcov: add Clang support Peter Oberparleiter
2019-01-17 21:30 ` Nick Desaulniers
2019-01-17 22:01 ` Tri Vo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190115183643.120619-5-trong@google.com \
--to=trong@android.com \
--cc=ghackmann@android.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ndesaulniers@google.com \
--cc=oberpar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome