diff options
author | bde <bde@FreeBSD.org> | 1998-07-29 14:19:48 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-29 14:19:48 +0000 |
commit | db2c82a097632c071cb6329fce1c42f5753de3f5 (patch) | |
tree | f7f476e6cc035883baff248789341647b8a7ea28 /sys/conf | |
parent | 0ffccfde1572cb6bc3af291d5901bd93508a62ed (diff) | |
download | FreeBSD-src-db2c82a097632c071cb6329fce1c42f5753de3f5.zip FreeBSD-src-db2c82a097632c071cb6329fce1c42f5753de3f5.tar.gz |
Honor NOSHARED for tools. All tools should be built static for
`make world' to avoid problems with picking up (new) target or (stale)
host shared libraries.
Don't honor -static in LDFLAGS for linking LKMs. LDFLAGS is not
actually for ld, but we use it anyway, and must prevent -static being
misinterpreted as -s.
Don't hide any of the link steps.
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/kmod.mk | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 6c73de9..3d97b72 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.kmod.mk,v 1.48 1998/03/19 13:22:46 bde Exp $ +# $Id: bsd.kmod.mk,v 1.49 1998/06/09 02:55:40 bde Exp $ # # The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules. # @@ -106,6 +106,10 @@ CFLAGS+= -I${.OBJDIR} -I${.OBJDIR}/@ CFLAGS+= -I${DESTDIR}/usr/include .endif +.if defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" ) +LDFLAGS+= -static +.endif + EXPORT_SYMS?= _${KMOD} .if defined(VFS_LKM) @@ -125,12 +129,12 @@ PROG= ${KMOD}.o .endif ${PROG}: ${OBJS} ${DPADD} - ${LD} -r ${LDFLAGS} -o tmp.o ${OBJS} + ${LD} -r ${LDFLAGS:N-static} -o tmp.o ${OBJS} .if defined(EXPORT_SYMS) - @rm -f symb.tmp - @for i in ${EXPORT_SYMS} ; do echo $$i >> symb.tmp ; done + rm -f symb.tmp + for i in ${EXPORT_SYMS} ; do echo $$i >> symb.tmp ; done symorder -c symb.tmp tmp.o - @rm -f symb.tmp + rm -f symb.tmp .endif mv tmp.o ${.TARGET} |