aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-04-16 22:34:10 +0000
committerEd Maste <emaste@FreeBSD.org>2015-04-16 22:34:10 +0000
commit7dd824c370b73e1d0674a8f61551213593d8395b (patch)
tree85d9b7d816c16258512bea040df0b920150172e6 /sys/conf
parentdec32474f0ba1288bc3b0a10c864ec65ce2d831e (diff)
downloadsrc-7dd824c370b73e1d0674a8f61551213593d8395b.tar.gz
src-7dd824c370b73e1d0674a8f61551213593d8395b.zip
Fix kernel build ${MACHINE} path
$M should be the kernel machine src directory, ${MACHINE}. In most cases ${MACHINE} and ${MACHINE_CPUARCH} are the same, but this is not true for pc98 and arm64. It appears we previously set M=${MACHINE_CPUARCH} as a workaround to accommodate pc98, where MACHINE_CPUARCH is pc98 but it uses sys/i386/i386/genassym.c. arm64 relies on this being set correctly, so update $M and add explicit workarounds for pc98. Differential Revision: https://reviews.freebsd.org/D2307 Reviewed by: andrew, imp Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=281627
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/Makefile.pc983
-rw-r--r--sys/conf/kern.pre.mk2
-rw-r--r--sys/conf/kmod.mk4
3 files changed, 6 insertions, 3 deletions
diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98
index 9d0f25b57a57..1bd5bae805f7 100644
--- a/sys/conf/Makefile.pc98
+++ b/sys/conf/Makefile.pc98
@@ -28,6 +28,9 @@ S= ./@
S= ../../..
.endif
.endif
+
+LDSCRIPT_NAME?= ldscript.${MACHINE_ARCH}
+
.include "$S/conf/kern.pre.mk"
ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS34}
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index cc16d15b1e72..99ada0508294 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -26,7 +26,7 @@ KODIR?= /boot/${KERNEL}
LDSCRIPT_NAME?= ldscript.$M
LDSCRIPT?= $S/conf/${LDSCRIPT_NAME}
-M= ${MACHINE_CPUARCH}
+M= ${MACHINE}
AWK?= awk
CP?= cp
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index ee892605a014..0f27113e3960 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -425,10 +425,10 @@ genassym.o: opt_global.h
.endif
assym.s: ${SYSDIR}/kern/genassym.sh
sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET}
-genassym.o: ${SYSDIR}/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c
+genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
genassym.o: ${SRCS:Mopt_*.h}
${CC} -c ${CFLAGS:N-fno-common} \
- ${SYSDIR}/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c
+ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
.endif
lint: ${SRCS}