summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-05-28 05:22:03 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-06-08 05:56:02 -0400
commit6a61b70b43c9c4cbc7314bf6c8b5ba8b0d6e1e7b (patch)
tree390a3c7ef40859d0911cca7382ecfe46e777ad43
parentf3a53f7b5740b0cd411262ee56a0fb7248199d3a (diff)
gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT
CONFIG_GCOV_FORMAT_AUTODETECT compiles either gcc_3_4.c or gcc_4_7.c according to your GCC version. We can achieve the equivalent behavior by setting reasonable dependency with the knowledge of the compiler version. If GCC older than 4.7 is used, GCOV_FORMAT_3_4 is the default, but users are still allowed to select GCOV_FORMAT_4_7 in case the newer format is back-ported. On the other hand, If GCC 4.7 or newer is used, there is no reason to use GCOV_FORMAT_3_4, so it should be hidden. If you downgrade the compiler to GCC 4.7 or older, oldconfig/syncconfig will display a prompt for the choice because GCOV_FORMAT_3_4 becomes visible as a new symbol. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Reviewed-by: Kees Cook <keescook@chromium.org>
-rw-r--r--kernel/gcov/Kconfig17
-rw-r--r--kernel/gcov/Makefile2
2 files changed, 5 insertions, 14 deletions
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig
index 1276aabaab55..1e3823fa799b 100644
--- a/kernel/gcov/Kconfig
+++ b/kernel/gcov/Kconfig
@@ -53,23 +53,16 @@ config GCOV_PROFILE_ALL
53choice 53choice
54 prompt "Specify GCOV format" 54 prompt "Specify GCOV format"
55 depends on GCOV_KERNEL 55 depends on GCOV_KERNEL
56 default GCOV_FORMAT_AUTODETECT
57 ---help--- 56 ---help---
58 The gcov format is usually determined by the GCC version, but there are 57 The gcov format is usually determined by the GCC version, and the
58 default is chosen according to your GCC version. However, there are
59 exceptions where format changes are integrated in lower-version GCCs. 59 exceptions where format changes are integrated in lower-version GCCs.
60 In such a case use this option to adjust the format used in the kernel 60 In such a case, change this option to adjust the format used in the
61 accordingly. 61 kernel accordingly.
62
63 If unsure, choose "Autodetect".
64
65config GCOV_FORMAT_AUTODETECT
66 bool "Autodetect"
67 ---help---
68 Select this option to use the format that corresponds to your GCC
69 version.
70 62
71config GCOV_FORMAT_3_4 63config GCOV_FORMAT_3_4
72 bool "GCC 3.4 format" 64 bool "GCC 3.4 format"
65 depends on CC_IS_GCC && GCC_VERSION < 40700
73 ---help--- 66 ---help---
74 Select this option to use the format defined by GCC 3.4. 67 Select this option to use the format defined by GCC 3.4.
75 68
diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile
index c6c50e5c680e..ff06d64df397 100644
--- a/kernel/gcov/Makefile
+++ b/kernel/gcov/Makefile
@@ -4,5 +4,3 @@ ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"'
4obj-y := base.o fs.o 4obj-y := base.o fs.o
5obj-$(CONFIG_GCOV_FORMAT_3_4) += gcc_3_4.o 5obj-$(CONFIG_GCOV_FORMAT_3_4) += gcc_3_4.o
6obj-$(CONFIG_GCOV_FORMAT_4_7) += gcc_4_7.o 6obj-$(CONFIG_GCOV_FORMAT_4_7) += gcc_4_7.o
7obj-$(CONFIG_GCOV_FORMAT_AUTODETECT) += $(call cc-ifversion, -lt, 0407, \
8 gcc_3_4.o, gcc_4_7.o)