|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tests/cpu-policy: Skip building on older versions of GCC
commit 6fdde9e30846d09dfe0bf0f68de4afa13ef10c22
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri May 24 14:14:17 2019 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri May 24 17:50:57 2019 +0100
tests/cpu-policy: Skip building on older versions of GCC
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@xxxxxxxxxx>
Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
tools/tests/cpu-policy/Makefile | 15 ++++++++++++++-
tools/tests/x86_emulator/Makefile | 2 +-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/tools/tests/cpu-policy/Makefile b/tools/tests/cpu-policy/Makefile
index eeed7f3da7..07dd58f5c2 100644
--- a/tools/tests/cpu-policy/Makefile
+++ b/tools/tests/cpu-policy/Makefile
@@ -1,8 +1,21 @@
XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
+TARGET-y := test-cpu-policy
+
+# For brevity, these tests make extensive use of designated initialisers in
+# anonymous unions, 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)" (version
$(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 4f4c0f6034..175cebc095 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)" (version
$(shell $(CC) -dumpversion)) and an "{evex}" capable assembler)
endif
all: $(TARGET-y)
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |