Commit a75f8b8d authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Michal Marek

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: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 6dcb4e5e
ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"'
# if-lt
# Usage VAR := $(call if-lt, $(a), $(b))
# Returns 1 if (a < b)
if-lt = $(shell [ $(1) -lt $(2) ] && echo 1)
ifeq ($(CONFIG_GCOV_FORMAT_3_4),y)
cc-ver := 0304
else ifeq ($(CONFIG_GCOV_FORMAT_4_7),y)
cc-ver := 0407
else
cc-ver := $(cc-version)
endif
obj-y := base.o fs.o
ifeq ($(call if-lt, $(cc-ver), 0407),1)
obj-y += gcc_3_4.o
else
obj-y += gcc_4_7.o
endif
obj-$(CONFIG_GCOV_FORMAT_3_4) += gcc_3_4.o
obj-$(CONFIG_GCOV_FORMAT_4_7) += gcc_4_7.o
obj-$(CONFIG_GCOV_FORMAT_AUTODETECT) += $(call cc-ifversion, -lt, 0407, \
gcc_3_4.o, gcc_4_7.o)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment