summaryrefslogtreecommitdiff
path: root/share/mk/bsd.lkm.mk
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2007-11-04 00:06:20 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2007-11-04 00:06:20 +0000
commitaa2782be1f26d2877224820f53fbba2133f0471e (patch)
tree68c7cc5e93b01fee89f5162f1dc130037de39d64 /share/mk/bsd.lkm.mk
parent63a2db9353b78bc636206e478278dd814e2d4fed (diff)
Always compile modules with -mcmodel=kernel on amd64.
Fix parentheses while here. Reminded by deraadt@
Diffstat (limited to 'share/mk/bsd.lkm.mk')
-rw-r--r--share/mk/bsd.lkm.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/share/mk/bsd.lkm.mk b/share/mk/bsd.lkm.mk
index 58494fc4e32..f56a70f00d8 100644
--- a/share/mk/bsd.lkm.mk
+++ b/share/mk/bsd.lkm.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lkm.mk,v 1.20 2005/09/15 07:12:18 espie Exp $
+# $OpenBSD: bsd.lkm.mk,v 1.21 2007/11/04 00:06:19 mikeb Exp $
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
@@ -20,6 +20,10 @@ CFLAGS+= ${COPTS} -D_KERNEL -D_LKM -I/sys -I/sys/arch
CFLAGS+= ${CDIAGFLAGS}
.endif
+.if ${MACHINE} == "amd64"
+CFLAGS+= -mcmodel=kernel
+.endif
+
LDFLAGS+= -r
.if defined(LKM)
SRCS?= ${LKM}.c
@@ -86,13 +90,14 @@ realinstall:
load: ${COMBINED}
if [ -x ${.CURDIR}/${POSTINSTALL} ]; then \
- modload -d -o $(LKM) -e$(LKM) -p${.CURDIR}/${POSTINSTALL} $(COMBINED); \
+ modload -d -o ${LKM} -e${LKM}_lkmentry \
+ -p${.CURDIR}/${POSTINSTALL} ${COMBINED}; \
else \
- modload -d -o $(LKM) -e$(LKM) $(COMBINED); \
+ modload -d -o ${LKM} -e${LKM}_lkmentry ${COMBINED}; \
fi
unload:
- modunload -n $(LKM)
+ modunload -n ${LKM}
install: maninstall _SUBDIRUSE