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 <fhrbata@xxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html