summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-01-23 21:46:07 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-01-23 21:53:31 +0100
commite08d20cdd88dbe404879ae87f87a87fece7d04bf (patch)
tree3d137c65ac2514f009965a8192c7ccdd33c770b8
parent8edfe487200d3636aacf9131b8ecb7e441964f28 (diff)
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 <Jason@zx2c4.com>
-rw-r--r--src/tests/qemu/Makefile2
1 files changed, 2 insertions, 0 deletions
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))