[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1419485488-22336-7-git-send-email-yamada.m@jp.panasonic.com>
Date: Thu, 25 Dec 2014 14:31:28 +0900
From: Masahiro Yamada <yamada.m@...panasonic.com>
To: linux-kbuild@...r.kernel.org
Cc: Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>,
Michal Marek <mmarek@...e.cz>,
Masahiro Yamada <yamada.m@...panasonic.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 6/6] 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@...panasonic.com>
Cc: Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>
---
kernel/gcov/Makefile | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile
index 69b3515..752d648 100644
--- a/kernel/gcov/Makefile
+++ b/kernel/gcov/Makefile
@@ -1,22 +1,7 @@
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)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists