Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2013 23:30:50 GMT
From:      Godfrey van der Linden <gvdl@mac.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/177008: kmod.mk: EXPORT_SYMS make variable is broken for more than one symbol
Message-ID:  <201303152330.r2FNUoDL070915@red.freebsd.org>
Resent-Message-ID: <201303152340.r2FNe0JQ056241@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303152330.r2FNUoDL070915>