From 87b257c9de02e9c416d670335becf50fbf4f6a72 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 24 Nov 2017 14:02:32 +0000 Subject: [PATCH] Pick the right vDSO file/linker flags when building cloudabi32.ko on ARM64. The recently imported cloudabi_vdso_armv6_on_64bit.S should be the vDSO for 32-bit processes when being run on FreeBSD/arm64. This vDSO ensures that all system call arguments are padded to 64 bits, so that they can be used by the kernel to call into most of the native implementations directly. --- sys/modules/cloudabi32/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/modules/cloudabi32/Makefile b/sys/modules/cloudabi32/Makefile index d162e000a746..bf9a04b9b1b6 100644 --- a/sys/modules/cloudabi32/Makefile +++ b/sys/modules/cloudabi32/Makefile @@ -14,7 +14,11 @@ SRCS= cloudabi32_fd.c cloudabi32_module.c cloudabi32_poll.c \ OBJS= cloudabi32_vdso_blob.o CLEANFILES=cloudabi32_vdso.o -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "aarch64" +VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_armv6_on_64bit.S +OUTPUT_TARGET=elf64-littleaarch64 +BINARY_ARCHITECTURE=aarch64 +.elif ${MACHINE_CPUARCH} == "amd64" VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S OUTPUT_TARGET=elf64-x86-64-freebsd BINARY_ARCHITECTURE=i386