aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tests/qemu
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
commit62e8720a11a8245eede57da30ee600ee9fbbd6f1 (patch)
tree58a7f839d75bd7f5b40b30a9fbe636e4653be366 /src/tests/qemu
parentqemu: disable PIE for compilation (diff)
downloadwireguard-monolithic-historical-62e8720a11a8245eede57da30ee600ee9fbbd6f1.tar.xz
wireguard-monolithic-historical-62e8720a11a8245eede57da30ee600ee9fbbd6f1.zip
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.
Diffstat (limited to 'src/tests/qemu')
-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))