Thread (31 messages) 31 messages, 4 authors, 2013-08-28
STALE4702d
Revisions (2)
  1. rfc current
  2. v2 [diff vs current]

[RFC PATCH 3/4] gcov: compile specific gcov implementation based on gcc version

From: Frantisek Hrbata <hidden>
Date: 2013-08-23 08:39:59
Also in: lkml
Subsystem: gcov based kernel profiling, the rest · Maintainers: Peter Oberparleiter, Linus Torvalds

Compile the correct gcov implementation file for a specific gcc version. In
the future, if another file is added, the conditions will need to be somehow
adjusted to if-elif-else case, but at this point the simple cc-ifversion should
be enough.

Signed-off-by: Frantisek Hrbata <redacted>
---
 kernel/gcov/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile
index e97ca59..d57b712 100644
--- a/kernel/gcov/Makefile
+++ b/kernel/gcov/Makefile
@@ -1,3 +1,6 @@
 ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"'
 
-obj-$(CONFIG_GCOV_KERNEL) := base.o fs.o gcc_3_4.o
+obj-$(CONFIG_GCOV_KERNEL) := base.o fs.o
+
+obj-$(CONFIG_GCOV_KERNEL) += $(call cc-ifversion, -ge, 0407, gcc_4_7.o)
+obj-$(CONFIG_GCOV_KERNEL) += $(call cc-ifversion, -lt, 0407, gcc_3_4.o)
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help