svn commit: r304745 - in head/sys/modules: . cloudabi32
Ed Schouten
ed at FreeBSD.org
Wed Aug 24 11:35:51 UTC 2016
Author: ed
Date: Wed Aug 24 11:35:49 2016
New Revision: 304745
URL: https://svnweb.freebsd.org/changeset/base/304745
Log:
Add a Makefile for building the cloudabi32 kernel module.
Where the cloudabi64 kernel can be used to execute 64-bit CloudABI
binaries, this one should be used for 32-bit binaries. Right now it
works on i386 and amd64.
Added:
head/sys/modules/cloudabi32/
- copied from r304742, head/sys/modules/cloudabi64/
Modified:
head/sys/modules/Makefile
head/sys/modules/cloudabi32/Makefile
Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile Wed Aug 24 10:51:33 2016 (r304744)
+++ head/sys/modules/Makefile Wed Aug 24 11:35:49 2016 (r304745)
@@ -75,6 +75,7 @@ SUBDIR= \
${_cfi} \
${_ciss} \
cloudabi \
+ ${_cloudabi32} \
${_cloudabi64} \
${_cm} \
${_cmx} \
@@ -765,6 +766,9 @@ _epic= epic
_igb= igb
.endif
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
+_cloudabi32= cloudabi32
+.endif
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
_cloudabi64= cloudabi64
.endif
Modified: head/sys/modules/cloudabi32/Makefile
==============================================================================
--- head/sys/modules/cloudabi64/Makefile Wed Aug 24 10:13:18 2016 (r304742)
+++ head/sys/modules/cloudabi32/Makefile Wed Aug 24 11:35:49 2016 (r304745)
@@ -2,36 +2,36 @@
SYSDIR?=${.CURDIR}/../..
-.PATH: ${SYSDIR}/compat/cloudabi64
-.PATH: ${SYSDIR}/${MACHINE}/cloudabi64
+.PATH: ${SYSDIR}/compat/cloudabi32
+.PATH: ${SYSDIR}/${MACHINE}/cloudabi32
-KMOD= cloudabi64
-SRCS= cloudabi64_fd.c cloudabi64_module.c cloudabi64_poll.c \
- cloudabi64_sock.c cloudabi64_syscalls.c cloudabi64_sysent.c \
- cloudabi64_sysvec.c cloudabi64_thread.c
-
-OBJS= cloudabi64_vdso_blob.o
-CLEANFILES=cloudabi64_vdso.o
-
-.if ${MACHINE_CPUARCH} == "aarch64"
-VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_aarch64.S
-OUTPUT_TARGET=elf64-littleaarch64
-BINARY_ARCHITECTURE=aarch64
+KMOD= cloudabi32
+SRCS= cloudabi32_fd.c cloudabi32_module.c cloudabi32_poll.c \
+ cloudabi32_sock.c cloudabi32_syscalls.c cloudabi32_sysent.c \
+ cloudabi32_sysvec.c cloudabi32_thread.c
+
+OBJS= cloudabi32_vdso_blob.o
+CLEANFILES=cloudabi32_vdso.o
+
+.if ${MACHINE_CPUARCH} == "i386"
+VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686.S
+OUTPUT_TARGET=elf32-i386-freebsd
+BINARY_ARCHITECTURE=aarch32
.elif ${MACHINE_CPUARCH} == "amd64"
-VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_x86_64.S
+VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
OUTPUT_TARGET=elf64-x86-64-freebsd
BINARY_ARCHITECTURE=i386
.endif
-cloudabi64_vdso.o: ${VDSO_SRCS}
- ${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib \
+cloudabi32_vdso.o: ${VDSO_SRCS}
+ ${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \
-Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \
${VDSO_SRCS} -o ${.TARGET}
-cloudabi64_vdso_blob.o: cloudabi64_vdso.o
+cloudabi32_vdso_blob.o: cloudabi32_vdso.o
${OBJCOPY} --input-target binary \
--output-target ${OUTPUT_TARGET} \
--binary-architecture ${BINARY_ARCHITECTURE} \
- cloudabi64_vdso.o ${.TARGET}
+ cloudabi32_vdso.o ${.TARGET}
.include <bsd.kmod.mk>
More information about the svn-src-head
mailing list