aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tests/qemu/Makefile
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-01 21:24:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 14:37:53 +0200
commit28eb3d08402e0845e927e3cd5422b12025cab253 (patch)
treead193cba6a8846b4ca6776bb48162e504b0bcaf3 /src/tests/qemu/Makefile
parentqemu: give up and accept a mips64r2 world (diff)
downloadwireguard-monolithic-historical-28eb3d08402e0845e927e3cd5422b12025cab253.tar.xz
wireguard-monolithic-historical-28eb3d08402e0845e927e3cd5422b12025cab253.zip
qemu: support powerpc64le
This uses ELFv2 ABI, which is the only ppc64 ABI musl supports. Big endian uses ELFv1 ABI, which musl doesn't support.
Diffstat (limited to 'src/tests/qemu/Makefile')
-rw-r--r--src/tests/qemu/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tests/qemu/Makefile b/src/tests/qemu/Makefile
index f00f6dd..0c4bca3 100644
--- a/src/tests/qemu/Makefile
+++ b/src/tests/qemu/Makefile
@@ -182,6 +182,16 @@ else
QEMU_MACHINE := -cpu 24Kf -machine malta -smp 1
CFLAGS += -march=mips32r2 -EL
endif
+else ifeq ($(ARCH),powerpc64le)
+QEMU_ARCH := ppc64
+KERNEL_ARCH := powerpc
+KERNEL_BZIMAGE := $(KERNEL_PATH)/vmlinux
+ifeq ($(CHOST),$(CBUILD))
+QEMU_MACHINE := -cpu host,accel=kvm -machine pseries
+else
+QEMU_MACHINE := -machine pseries
+endif
+CFLAGS += -mcpu=powerpc64le -mlong-double-64
else ifeq ($(ARCH),powerpc)
QEMU_ARCH := ppc
KERNEL_ARCH := powerpc
@@ -202,7 +212,7 @@ else
QEMU_MACHINE := -machine q800
endif
else
-$(error I only build: x86_64, i686, arm, armeb, aarch64, aarch64_be, mips, mipsel, mips64, mips64el, powerpc, m68k)
+$(error I only build: x86_64, i686, arm, armeb, aarch64, aarch64_be, mips, mipsel, mips64, mips64el, powerpc64le, powerpc, m68k)
endif
REAL_CC := $(CBUILD)-gcc
@@ -218,7 +228,7 @@ qemu: $(KERNEL_BZIMAGE)
-nographic \
-smp $(NR_CPUS) \
$(QEMU_MACHINE) \
- -m $$(grep -q CONFIG_DEBUG_KMEMLEAK=y $(KERNEL_PATH)/.config && echo 1G || echo 192M) \
+ -m $$(grep -q CONFIG_DEBUG_KMEMLEAK=y $(KERNEL_PATH)/.config && echo 1G || echo 256M) \
-serial stdio \
-serial file:$(BUILD_PATH)/result \
-no-reboot \