diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-12-25 00:31:28 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2015-01-09 11:25:44 -0500 |
commit | a75f8b8dab0f73459fa47a1daa10c84c4e8400a8 (patch) | |
tree | c1fa03613042e95fc3298e5f8a26f569cf8571e7 /kernel/gcov | |
parent | 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808 (diff) |
kbuild,gcov: simplify kernel/gcov/Makefile more
CONFIG_GCOV_FORMAT_3_4 / _4_7 / _AUTODETECT are exclusive.
Compare the CC version only when _AUTODETECT is enabled.
This change should have no impact.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'kernel/gcov')
-rw-r--r-- | kernel/gcov/Makefile | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile index 69b3515c1806..752d6486b67e 100644 --- a/kernel/gcov/Makefile +++ b/kernel/gcov/Makefile | |||
@@ -1,22 +1,7 @@ | |||
1 | ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"' | 1 | ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"' |
2 | 2 | ||
3 | # if-lt | ||
4 | # Usage VAR := $(call if-lt, $(a), $(b)) | ||
5 | # Returns 1 if (a < b) | ||
6 | if-lt = $(shell [ $(1) -lt $(2) ] && echo 1) | ||
7 | |||
8 | ifeq ($(CONFIG_GCOV_FORMAT_3_4),y) | ||
9 | cc-ver := 0304 | ||
10 | else ifeq ($(CONFIG_GCOV_FORMAT_4_7),y) | ||
11 | cc-ver := 0407 | ||
12 | else | ||
13 | cc-ver := $(cc-version) | ||
14 | endif | ||
15 | |||
16 | obj-y := base.o fs.o | 3 | obj-y := base.o fs.o |
17 | 4 | obj-$(CONFIG_GCOV_FORMAT_3_4) += gcc_3_4.o | |
18 | ifeq ($(call if-lt, $(cc-ver), 0407),1) | 5 | obj-$(CONFIG_GCOV_FORMAT_4_7) += gcc_4_7.o |
19 | obj-y += gcc_3_4.o | 6 | obj-$(CONFIG_GCOV_FORMAT_AUTODETECT) += $(call cc-ifversion, -lt, 0407, \ |
20 | else | 7 | gcc_3_4.o, gcc_4_7.o) |
21 | obj-y += gcc_4_7.o | ||
22 | endif | ||