kern/177008: kmod.mk: EXPORT_SYMS make variable is broken for more than one symbol
Godfrey van der Linden
gvdl at mac.com
Fri Mar 15 23:40:01 UTC 2013
>Number: 177008
>Category: kern
>Synopsis: kmod.mk: EXPORT_SYMS make variable is broken for more than one symbol
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 15 23:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Godfrey van der Linden
>Release: r249341
>Organization:
Juniper Networks, Inc
>Environment:
N/A
>Description:
src/sys/modules/mii/Makefile defines
EXPORT_SYMS= mii_attach \
mii_bitbang_readreg \
mii_bitbang_sync \
mii_bitbang_writereg \
mii_mediachg \
mii_pollstat \
mii_tick
But no symbols are actually exported, they are all local..
>How-To-Repeat:
cd src
make build-kernel
Run nm -g miibus.ko from where ever it lives in the obj tree.
>Fix:
One liner to src/sys/conf/kmod.mk and add TR executable to sys.mk:
$ svn diff share/mk sys/conf > /tmp/fbsd-1.txt
Index: share/mk/sys.mk
===================================================================
--- share/mk/sys.mk (revision 249341)
+++ share/mk/sys.mk (working copy)
@@ -144,6 +144,8 @@
SHELL ?= sh
+TR ?= tr
+
YACC ?= yacc
.if defined(%POSIX)
YFLAGS ?=
Index: sys/conf/kmod.mk
===================================================================
--- sys/conf/kmod.mk (revision 249341)
+++ sys/conf/kmod.mk (working copy)
@@ -210,7 +210,7 @@
.if ${EXPORT_SYMS} == NO
:> export_syms
.elif !exists(${.CURDIR}/${EXPORT_SYMS})
- echo ${EXPORT_SYMS} > export_syms
+ ${ECHO} ${EXPORT_SYMS} | ${TR} ' ' '\n' > export_syms
.else
grep -v '^#' < ${EXPORT_SYMS} > export_syms
.endif
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list