ae8ef112ad
This change copies the existing amd64_cloudabi64.c to amd64_cloudabi32.c and reimplements the functions for fetching system call arguments and return values to use the same scheme as used by the vDSO that is used when running cloudabi32 executables. As arguments are automatically padded to 64-bit words by the vDSO in userspace, we can copy the arguments directly into the array used by truss(8) internally. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D13516
45 lines
931 B
Makefile
45 lines
931 B
Makefile
# $FreeBSD$
|
|
|
|
#NO_WERROR=
|
|
PROG= truss
|
|
SRCS= main.c setup.c syscalls.c
|
|
|
|
LIBADD= sysdecode
|
|
|
|
#CFLAGS+= -I${.CURDIR} -I. -I${SRCTOP}/sys
|
|
CFLAGS+= -I${SRCTOP}/sys
|
|
|
|
ABIS+= freebsd
|
|
# Each ABI is expected to have an ABI.c, MACHINE_ARCH-ABI.c or
|
|
# MACHINE_CPUARCH-ABI.c file that will be used to map the syscall arguments.
|
|
.if ${MACHINE_ARCH} == "aarch64"
|
|
ABIS+= cloudabi64
|
|
.endif
|
|
.if ${MACHINE_CPUARCH} == "i386"
|
|
ABIS+= i386-linux
|
|
.endif
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
|
ABIS+= amd64-linux
|
|
ABIS+= amd64-linux32
|
|
ABIS+= freebsd32
|
|
ABIS+= cloudabi32
|
|
ABIS+= cloudabi64
|
|
.endif
|
|
.if ${MACHINE_ARCH} == "powerpc64"
|
|
ABIS+= freebsd32
|
|
.endif
|
|
|
|
.for abi in ${ABIS}
|
|
# Find the right file to handle this ABI.
|
|
abi_src=
|
|
ABI_SRCS= ${abi}.c ${MACHINE_ARCH}-${abi}.c ${MACHINE_CPUARCH}-${abi}.c
|
|
.for f in ${ABI_SRCS}
|
|
.if exists(${.CURDIR}/${f}) && empty(abi_src)
|
|
abi_src= ${f}
|
|
.endif
|
|
.endfor
|
|
SRCS:= ${SRCS} ${abi_src}
|
|
.endfor
|
|
|
|
.include <bsd.prog.mk>
|