aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-06-25 20:33:04 +0000
committerEd Maste <emaste@FreeBSD.org>2018-06-25 20:33:04 +0000
commitd3b03d746b9f12c8e6e55ca6d9528247e3bb3a84 (patch)
tree3daf5950e0cc659ee678a83a05c92d38e520921f
parente4b0a90e771b94e4b043729a6f0f5564f1d01aca (diff)
Notes
-rw-r--r--sys/modules/linux64/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile
index 17f2f87e843b..21ed35c4f06e 100644
--- a/sys/modules/linux64/Makefile
+++ b/sys/modules/linux64/Makefile
@@ -35,9 +35,16 @@ linux_locore.o: linux_locore.s linux_assym.h
-Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \
${.IMPSRC} -o ${.TARGET}
+.if ${MACHINE_CPUARCH} == "aarch64"
+OBJCOPY_TARGET=--output-target elf64-littleaarch64 --binary-architecture aarch64
+.elif ${MACHINE_CPUARCH} == "amd64"
+OBJCOPY_TARGET=--output-target elf64-x86-64 --binary-architecture i386:x86-64
+.else
+.error ${MACHINE_CPUARCH} not yet supported by linux64
+.endif
${VDSO}.so: linux_locore.o
- ${OBJCOPY} --input-target binary --output-target elf64-x86-64 \
- -S -g --binary-architecture i386:x86-64 linux_locore.o ${.TARGET}
+ ${OBJCOPY} --input-target binary ${OBJCOPY_TARGET} -S -g \
+ linux_locore.o ${.TARGET}
strip -N _binary_linux_locore_o_size ${.TARGET}
linux_support.o: assym.inc linux_assym.h