Re: [Xen-devel] [PATCH v2 9/9] gcov: provide the capability to select gcov format automatically

2016-10-10 Thread Jan Beulich
>>> On 10.10.16 at 11:40,  wrote:
> And make it the default in Kconfig.
> 
> Signed-off-by: Wei Liu 

Acked-by: Jan Beulich 


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH v2 9/9] gcov: provide the capability to select gcov format automatically

2016-10-10 Thread Wei Liu
And make it the default in Kconfig.

Signed-off-by: Wei Liu 
---
v2: space -> tab and indent help text

Cc: Andrew Cooper 
Cc: George Dunlap 
Cc: Ian Jackson 
Cc: Jan Beulich 
Cc: Konrad Rzeszutek Wilk 
Cc: Stefano Stabellini 
Cc: Tim Deegan 
Cc: Wei Liu 
---
 xen/Kconfig.debug| 9 -
 xen/common/gcov/Makefile | 2 ++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index c65e543..2ffee02 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -38,10 +38,17 @@ config GCOV
 choice
prompt "Specify Gcov format"
depends on GCOV
-   default GCOV_FORMAT_4_7
+   default GCOV_FORMAT_AUTODETECT
---help---
  The gcov format is determined by gcc version.
 
+ If unsure, choose "Autodetect".
+
+config GCOV_FORMAT_AUTODETECT
+   bool "Autodetect"
+   ---help---
+ Automatically select gcov format based on GCC version.
+
 config GCOV_FORMAT_4_7
bool "GCC 4.7 format"
---help---
diff --git a/xen/common/gcov/Makefile b/xen/common/gcov/Makefile
index 03ac1e5..85f38e0 100644
--- a/xen/common/gcov/Makefile
+++ b/xen/common/gcov/Makefile
@@ -1,3 +1,5 @@
 obj-y += gcov_base.o gcov.o
 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,ge,0x040700, \
+   gcc_4_7.o, gcc_3_4.o)
-- 
2.1.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel