1 Nov 2005 14:38
LKM fix for amd64
Mike Belopuhov <mkb <at> crypt.org.ru>
2005-11-01 13:38:06 GMT
2005-11-01 13:38:06 GMT
Hi, this patch makes LKM code correctly map memory on amd64 and
actually allows LKM work on that platform.
Also this fixes building LKM objects with gcc3.
Patch doesn't make any changes related to other platforms.
Fix by Oleg Safiullin <form <at> pdp-11.org.ru>.
Tested by him and me.
Index: share/mk/bsd.lkm.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.lkm.mk,v
retrieving revision 1.20
diff -d -u -r1.20 bsd.lkm.mk
--- share/mk/bsd.lkm.mk 2005/09/15 07:12:18 1.20
+++ share/mk/bsd.lkm.mk 2005/11/01 13:08:32
<at> <at> -20,6 +20,10 <at> <at>
CFLAGS+= ${CDIAGFLAGS}
.endif
+.if ${MACHINE_ARCH} == "amd64"
+CFLAGS+= -mcmodel=kernel
+.endif
+
LDFLAGS+= -r
.if defined(LKM)
SRCS?= ${LKM}.c
Index: sys/arch/amd64/amd64/machdep.c
(Continue reading)
Cordialement,
Jean-Girard Pailloncy
RSS Feed