From e08d20cdd88dbe404879ae87f87a87fece7d04bf Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 23 Jan 2018 21:46:07 +0100 Subject: qemu: disable AVX-512 in userland We're trying to test kernel code, so the userland tools we use for doing that testing don't really matter to us. We turn off AVX512, because WireGuard supports kernels that do not support AVX512 userlands. It's easier to just blanket-disable it all, since it doesn't matter anyway. Signed-off-by: Jason A. Donenfeld --- src/tests/qemu/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/qemu/Makefile b/src/tests/qemu/Makefile index 3d4dae4..97cd80d 100644 --- a/src/tests/qemu/Makefile +++ b/src/tests/qemu/Makefile @@ -67,6 +67,8 @@ ifeq ($(CHOST),$(CBUILD)) CROSS_COMPILE_FLAG := --host=$(CHOST) NOPIE_GCC := gcc -fno-PIE CFLAGS += -march=native +OMIT_AVX512 := $(shell gcc -march=native -Q --help=target | sed -n 's/.*\-m\(avx512[^ ]*\).*\[enabled\].*/-mno-\1/p') +CFLAGS += $(OMIT_AVX512) STRIP := strip else $(info Cross compilation: building for $(CBUILD) using $(CHOST)) -- cgit v1.2.3