All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 13:29 ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-24 13:29 UTC (permalink / raw)
  To: Xen-devel
  Cc: Andrew Cooper, Ian Jackson, Wei Liu, Jan Beulich, Roger Pau Monné

GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
in anonymous unions.  As this is just a developer tool, skip the test in this
case, rather than sacraficing the legibility/expresibility of the test cases.

This fixes the Gitlab CI tests.

While adding this logic to cpu-polcy, adjust the equivelent logic from
x86_emulator on which this was based.  Printing:

  Test harness not built, use newer compiler than "gcc"

isn't helpful for anyone unexpectedly encountering the error.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Ian Jackson <Ian.Jackson@citrix.com>
---
 tools/tests/cpu-policy/Makefile   | 14 +++++++++++++-
 tools/tests/x86_emulator/Makefile |  2 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/tools/tests/cpu-policy/Makefile b/tools/tests/cpu-policy/Makefile
index eeed7f3..4b6caec 100644
--- a/tools/tests/cpu-policy/Makefile
+++ b/tools/tests/cpu-policy/Makefile
@@ -1,8 +1,20 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
+TARGET-y := test-cpu-policy
+
+# For brevity, these tests make extensive use of designated initialisers, but
+# GCCs older than 4.6 can't cope.  Ignore the test in this case.
+ifneq ($(clang),y)
+TARGET-$(call cc-ver,$(CC),lt,0x040600) :=
+endif
+
+ifeq ($(TARGET-y),)
+$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion))
+endif
+
 .PHONY: all
-all: test-cpu-policy
+all: $(TARGET-y)
 
 .PHONY: clean
 clean:
diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index 4f4c0f6..970ec3e 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
 TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null - || echo y) :=
 
 ifeq ($(TARGET-y),)
-$(warning Test harness not built, use newer compiler than "$(CC)")
+$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
 endif
 
 all: $(TARGET-y)
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Xen-devel] [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 13:29 ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-24 13:29 UTC (permalink / raw)
  To: Xen-devel
  Cc: Andrew Cooper, Ian Jackson, Wei Liu, Jan Beulich, Roger Pau Monné

GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
in anonymous unions.  As this is just a developer tool, skip the test in this
case, rather than sacraficing the legibility/expresibility of the test cases.

This fixes the Gitlab CI tests.

While adding this logic to cpu-polcy, adjust the equivelent logic from
x86_emulator on which this was based.  Printing:

  Test harness not built, use newer compiler than "gcc"

isn't helpful for anyone unexpectedly encountering the error.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Ian Jackson <Ian.Jackson@citrix.com>
---
 tools/tests/cpu-policy/Makefile   | 14 +++++++++++++-
 tools/tests/x86_emulator/Makefile |  2 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/tools/tests/cpu-policy/Makefile b/tools/tests/cpu-policy/Makefile
index eeed7f3..4b6caec 100644
--- a/tools/tests/cpu-policy/Makefile
+++ b/tools/tests/cpu-policy/Makefile
@@ -1,8 +1,20 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
+TARGET-y := test-cpu-policy
+
+# For brevity, these tests make extensive use of designated initialisers, but
+# GCCs older than 4.6 can't cope.  Ignore the test in this case.
+ifneq ($(clang),y)
+TARGET-$(call cc-ver,$(CC),lt,0x040600) :=
+endif
+
+ifeq ($(TARGET-y),)
+$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion))
+endif
+
 .PHONY: all
-all: test-cpu-policy
+all: $(TARGET-y)
 
 .PHONY: clean
 clean:
diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index 4f4c0f6..970ec3e 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
 TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null - || echo y) :=
 
 ifeq ($(TARGET-y),)
-$(warning Test harness not built, use newer compiler than "$(CC)")
+$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
 endif
 
 all: $(TARGET-y)
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 13:46   ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2019-05-24 13:46 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Xen-devel, Ian Jackson, Wei Liu, Jan Beulich, Roger Pau Monné

On Fri, May 24, 2019 at 02:29:46PM +0100, Andrew Cooper wrote:
> GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
> in anonymous unions.  As this is just a developer tool, skip the test in this
> case, rather than sacraficing the legibility/expresibility of the test cases.
> 
> This fixes the Gitlab CI tests.
> 
> While adding this logic to cpu-polcy, adjust the equivelent logic from
> x86_emulator on which this was based.  Printing:
> 
>   Test harness not built, use newer compiler than "gcc"
> 
> isn't helpful for anyone unexpectedly encountering the error.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 13:46   ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2019-05-24 13:46 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Xen-devel, Ian Jackson, Wei Liu, Jan Beulich, Roger Pau Monné

On Fri, May 24, 2019 at 02:29:46PM +0100, Andrew Cooper wrote:
> GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
> in anonymous unions.  As this is just a developer tool, skip the test in this
> case, rather than sacraficing the legibility/expresibility of the test cases.
> 
> This fixes the Gitlab CI tests.
> 
> While adding this logic to cpu-polcy, adjust the equivelent logic from
> x86_emulator on which this was based.  Printing:
> 
>   Test harness not built, use newer compiler than "gcc"
> 
> isn't helpful for anyone unexpectedly encountering the error.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 14:19   ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-24 14:19 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Wei Liu, xen-devel, Roger Pau Monne

>>> On 24.05.19 at 15:29, <andrew.cooper3@citrix.com> wrote:
> GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
> in anonymous unions.  As this is just a developer tool, skip the test in this
> case, rather than sacraficing the legibility/expresibility of the test cases.
> 
> This fixes the Gitlab CI tests.
> 
> While adding this logic to cpu-polcy, adjust the equivelent logic from
> x86_emulator on which this was based.  Printing:
> 
>   Test harness not built, use newer compiler than "gcc"
> 
> isn't helpful for anyone unexpectedly encountering the error.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Fundamentally
Reviewed-by: Jan Beulich <jbeulich@suse.com>
But there are remarks:

> --- a/tools/tests/cpu-policy/Makefile
> +++ b/tools/tests/cpu-policy/Makefile
> @@ -1,8 +1,20 @@
>  XEN_ROOT = $(CURDIR)/../../..
>  include $(XEN_ROOT)/tools/Rules.mk
>  
> +TARGET-y := test-cpu-policy
> +
> +# For brevity, these tests make extensive use of designated initialisers, but
> +# GCCs older than 4.6 can't cope.  Ignore the test in this case.

Designated initializers alone are no problem for old gcc. The issue is
with ones used for sub-structures/-unions without field name.
Perhaps worth slightly extending the comment to this effect?

> --- a/tools/tests/x86_emulator/Makefile
> +++ b/tools/tests/x86_emulator/Makefile
> @@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
>  TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null 
> - || echo y) :=
>  
>  ifeq ($(TARGET-y),)
> -$(warning Test harness not built, use newer compiler than "$(CC)")
> +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
>  endif

I appreciate the idea of providing mode information, but I'm afraid
this is going to be clumsy in the other direction now:

"Test harness not built, use newer compiler than gcc-4.8 4.8 and ..."

Naming the compiler binary, I thought, allows the user to figure
out the version easily enough. Therefore, please consider
dropping that part again.

I'm unconditionally fine with the {evex} addition.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 14:19   ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-24 14:19 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Wei Liu, xen-devel, Roger Pau Monne

>>> On 24.05.19 at 15:29, <andrew.cooper3@citrix.com> wrote:
> GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
> in anonymous unions.  As this is just a developer tool, skip the test in this
> case, rather than sacraficing the legibility/expresibility of the test cases.
> 
> This fixes the Gitlab CI tests.
> 
> While adding this logic to cpu-polcy, adjust the equivelent logic from
> x86_emulator on which this was based.  Printing:
> 
>   Test harness not built, use newer compiler than "gcc"
> 
> isn't helpful for anyone unexpectedly encountering the error.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Fundamentally
Reviewed-by: Jan Beulich <jbeulich@suse.com>
But there are remarks:

> --- a/tools/tests/cpu-policy/Makefile
> +++ b/tools/tests/cpu-policy/Makefile
> @@ -1,8 +1,20 @@
>  XEN_ROOT = $(CURDIR)/../../..
>  include $(XEN_ROOT)/tools/Rules.mk
>  
> +TARGET-y := test-cpu-policy
> +
> +# For brevity, these tests make extensive use of designated initialisers, but
> +# GCCs older than 4.6 can't cope.  Ignore the test in this case.

Designated initializers alone are no problem for old gcc. The issue is
with ones used for sub-structures/-unions without field name.
Perhaps worth slightly extending the comment to this effect?

> --- a/tools/tests/x86_emulator/Makefile
> +++ b/tools/tests/x86_emulator/Makefile
> @@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
>  TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null 
> - || echo y) :=
>  
>  ifeq ($(TARGET-y),)
> -$(warning Test harness not built, use newer compiler than "$(CC)")
> +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
>  endif

I appreciate the idea of providing mode information, but I'm afraid
this is going to be clumsy in the other direction now:

"Test harness not built, use newer compiler than gcc-4.8 4.8 and ..."

Naming the compiler binary, I thought, allows the user to figure
out the version easily enough. Therefore, please consider
dropping that part again.

I'm unconditionally fine with the {evex} addition.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 14:43     ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-24 14:43 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ian Jackson, Wei Liu, xen-devel, Roger Pau Monne

On 24/05/2019 15:19, Jan Beulich wrote:
>>>> On 24.05.19 at 15:29, <andrew.cooper3@citrix.com> wrote:
>> GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
>> in anonymous unions.  As this is just a developer tool, skip the test in this
>> case, rather than sacraficing the legibility/expresibility of the test cases.
>>
>> This fixes the Gitlab CI tests.
>>
>> While adding this logic to cpu-polcy, adjust the equivelent logic from
>> x86_emulator on which this was based.  Printing:
>>
>>   Test harness not built, use newer compiler than "gcc"
>>
>> isn't helpful for anyone unexpectedly encountering the error.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Fundamentally
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> But there are remarks:
>
>> --- a/tools/tests/cpu-policy/Makefile
>> +++ b/tools/tests/cpu-policy/Makefile
>> @@ -1,8 +1,20 @@
>>  XEN_ROOT = $(CURDIR)/../../..
>>  include $(XEN_ROOT)/tools/Rules.mk
>>  
>> +TARGET-y := test-cpu-policy
>> +
>> +# For brevity, these tests make extensive use of designated initialisers, but
>> +# GCCs older than 4.6 can't cope.  Ignore the test in this case.
> Designated initializers alone are no problem for old gcc. The issue is
> with ones used for sub-structures/-unions without field name.
> Perhaps worth slightly extending the comment to this effect?

" in anonymous unions" ?  I can never remember exactly which bit it
chokes on, but I think there are two different ones in practice which
interfere.

>
>> --- a/tools/tests/x86_emulator/Makefile
>> +++ b/tools/tests/x86_emulator/Makefile
>> @@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
>>  TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null 
>> - || echo y) :=
>>  
>>  ifeq ($(TARGET-y),)
>> -$(warning Test harness not built, use newer compiler than "$(CC)")
>> +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
>>  endif
> I appreciate the idea of providing mode information, but I'm afraid
> this is going to be clumsy in the other direction now:
>
> "Test harness not built, use newer compiler than gcc-4.8 4.8 and ..."
>
> Naming the compiler binary, I thought, allows the user to figure
> out the version easily enough. Therefore, please consider
> dropping that part again.

I'm afraid you have a selection bias here.  Your compiler binaries may
have a version suffix, but the overwhelming majority of people who are
going to hit that error and need to figure out what to do will be using
their system-provided binaries, as per the commit message.

What about:

  ... than "$(CC)" (version $(shell $(CC) -dumpversion)) and ...

which should (in your example) render as:

  ... than "gcc-4.8" (version 4.8) and ...

?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 14:43     ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-24 14:43 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ian Jackson, Wei Liu, xen-devel, Roger Pau Monne

On 24/05/2019 15:19, Jan Beulich wrote:
>>>> On 24.05.19 at 15:29, <andrew.cooper3@citrix.com> wrote:
>> GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers
>> in anonymous unions.  As this is just a developer tool, skip the test in this
>> case, rather than sacraficing the legibility/expresibility of the test cases.
>>
>> This fixes the Gitlab CI tests.
>>
>> While adding this logic to cpu-polcy, adjust the equivelent logic from
>> x86_emulator on which this was based.  Printing:
>>
>>   Test harness not built, use newer compiler than "gcc"
>>
>> isn't helpful for anyone unexpectedly encountering the error.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Fundamentally
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> But there are remarks:
>
>> --- a/tools/tests/cpu-policy/Makefile
>> +++ b/tools/tests/cpu-policy/Makefile
>> @@ -1,8 +1,20 @@
>>  XEN_ROOT = $(CURDIR)/../../..
>>  include $(XEN_ROOT)/tools/Rules.mk
>>  
>> +TARGET-y := test-cpu-policy
>> +
>> +# For brevity, these tests make extensive use of designated initialisers, but
>> +# GCCs older than 4.6 can't cope.  Ignore the test in this case.
> Designated initializers alone are no problem for old gcc. The issue is
> with ones used for sub-structures/-unions without field name.
> Perhaps worth slightly extending the comment to this effect?

" in anonymous unions" ?  I can never remember exactly which bit it
chokes on, but I think there are two different ones in practice which
interfere.

>
>> --- a/tools/tests/x86_emulator/Makefile
>> +++ b/tools/tests/x86_emulator/Makefile
>> @@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
>>  TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null 
>> - || echo y) :=
>>  
>>  ifeq ($(TARGET-y),)
>> -$(warning Test harness not built, use newer compiler than "$(CC)")
>> +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
>>  endif
> I appreciate the idea of providing mode information, but I'm afraid
> this is going to be clumsy in the other direction now:
>
> "Test harness not built, use newer compiler than gcc-4.8 4.8 and ..."
>
> Naming the compiler binary, I thought, allows the user to figure
> out the version easily enough. Therefore, please consider
> dropping that part again.

I'm afraid you have a selection bias here.  Your compiler binaries may
have a version suffix, but the overwhelming majority of people who are
going to hit that error and need to figure out what to do will be using
their system-provided binaries, as per the commit message.

What about:

  ... than "$(CC)" (version $(shell $(CC) -dumpversion)) and ...

which should (in your example) render as:

  ... than "gcc-4.8" (version 4.8) and ...

?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 15:25       ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-24 15:25 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Wei Liu, xen-devel, Roger Pau Monne

>>> On 24.05.19 at 16:43, <andrew.cooper3@citrix.com> wrote:
> On 24/05/2019 15:19, Jan Beulich wrote:
>>>>> On 24.05.19 at 15:29, <andrew.cooper3@citrix.com> wrote:
>>> --- a/tools/tests/cpu-policy/Makefile
>>> +++ b/tools/tests/cpu-policy/Makefile
>>> @@ -1,8 +1,20 @@
>>>  XEN_ROOT = $(CURDIR)/../../..
>>>  include $(XEN_ROOT)/tools/Rules.mk
>>>  
>>> +TARGET-y := test-cpu-policy
>>> +
>>> +# For brevity, these tests make extensive use of designated initialisers, but
>>> +# GCCs older than 4.6 can't cope.  Ignore the test in this case.
>> Designated initializers alone are no problem for old gcc. The issue is
>> with ones used for sub-structures/-unions without field name.
>> Perhaps worth slightly extending the comment to this effect?
> 
> " in anonymous unions" ?  I can never remember exactly which bit it
> chokes on, but I think there are two different ones in practice which
> interfere.

" in anonymous unions" is fine with me.

>>> --- a/tools/tests/x86_emulator/Makefile
>>> +++ b/tools/tests/x86_emulator/Makefile
>>> @@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
>>>  TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null > - || echo y) :=
>>>  
>>>  ifeq ($(TARGET-y),)
>>> -$(warning Test harness not built, use newer compiler than "$(CC)")
>>> +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
>>>  endif
>> I appreciate the idea of providing mode information, but I'm afraid
>> this is going to be clumsy in the other direction now:
>>
>> "Test harness not built, use newer compiler than gcc-4.8 4.8 and ..."
>>
>> Naming the compiler binary, I thought, allows the user to figure
>> out the version easily enough. Therefore, please consider
>> dropping that part again.
> 
> I'm afraid you have a selection bias here.  Your compiler binaries may
> have a version suffix, but the overwhelming majority of people who are
> going to hit that error and need to figure out what to do will be using
> their system-provided binaries, as per the commit message.

Well, I can only judge by what the distro does that I use; I wasn't
aware they do something non-standard. I've already avoided
mentioning my own compiler naming scheme.

> What about:
> 
>   ... than "$(CC)" (version $(shell $(CC) -dumpversion)) and ...
> 
> which should (in your example) render as:
> 
>   ... than "gcc-4.8" (version 4.8) and ...
> 
> ?

Better, so let's go with this.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH] tests/cpu-policy: Skip building on older versions of GCC
@ 2019-05-24 15:25       ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-24 15:25 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Wei Liu, xen-devel, Roger Pau Monne

>>> On 24.05.19 at 16:43, <andrew.cooper3@citrix.com> wrote:
> On 24/05/2019 15:19, Jan Beulich wrote:
>>>>> On 24.05.19 at 15:29, <andrew.cooper3@citrix.com> wrote:
>>> --- a/tools/tests/cpu-policy/Makefile
>>> +++ b/tools/tests/cpu-policy/Makefile
>>> @@ -1,8 +1,20 @@
>>>  XEN_ROOT = $(CURDIR)/../../..
>>>  include $(XEN_ROOT)/tools/Rules.mk
>>>  
>>> +TARGET-y := test-cpu-policy
>>> +
>>> +# For brevity, these tests make extensive use of designated initialisers, but
>>> +# GCCs older than 4.6 can't cope.  Ignore the test in this case.
>> Designated initializers alone are no problem for old gcc. The issue is
>> with ones used for sub-structures/-unions without field name.
>> Perhaps worth slightly extending the comment to this effect?
> 
> " in anonymous unions" ?  I can never remember exactly which bit it
> chokes on, but I think there are two different ones in practice which
> interfere.

" in anonymous unions" is fine with me.

>>> --- a/tools/tests/x86_emulator/Makefile
>>> +++ b/tools/tests/x86_emulator/Makefile
>>> @@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor))))
>>>  TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null > - || echo y) :=
>>>  
>>>  ifeq ($(TARGET-y),)
>>> -$(warning Test harness not built, use newer compiler than "$(CC)")
>>> +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler)
>>>  endif
>> I appreciate the idea of providing mode information, but I'm afraid
>> this is going to be clumsy in the other direction now:
>>
>> "Test harness not built, use newer compiler than gcc-4.8 4.8 and ..."
>>
>> Naming the compiler binary, I thought, allows the user to figure
>> out the version easily enough. Therefore, please consider
>> dropping that part again.
> 
> I'm afraid you have a selection bias here.  Your compiler binaries may
> have a version suffix, but the overwhelming majority of people who are
> going to hit that error and need to figure out what to do will be using
> their system-provided binaries, as per the commit message.

Well, I can only judge by what the distro does that I use; I wasn't
aware they do something non-standard. I've already avoided
mentioning my own compiler naming scheme.

> What about:
> 
>   ... than "$(CC)" (version $(shell $(CC) -dumpversion)) and ...
> 
> which should (in your example) render as:
> 
>   ... than "gcc-4.8" (version 4.8) and ...
> 
> ?

Better, so let's go with this.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-05-24 15:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 13:29 [PATCH] tests/cpu-policy: Skip building on older versions of GCC Andrew Cooper
2019-05-24 13:29 ` [Xen-devel] " Andrew Cooper
2019-05-24 13:46 ` Wei Liu
2019-05-24 13:46   ` [Xen-devel] " Wei Liu
2019-05-24 14:19 ` Jan Beulich
2019-05-24 14:19   ` [Xen-devel] " Jan Beulich
2019-05-24 14:43   ` Andrew Cooper
2019-05-24 14:43     ` [Xen-devel] " Andrew Cooper
2019-05-24 15:25     ` Jan Beulich
2019-05-24 15:25       ` [Xen-devel] " Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.