From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 15 23:40:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3F432848 for ; Fri, 15 Mar 2013 23:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E2FA6660 for ; Fri, 15 Mar 2013 23:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FNe0S1056242 for ; Fri, 15 Mar 2013 23:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2FNe0JQ056241; Fri, 15 Mar 2013 23:40:00 GMT (envelope-from gnats) Resent-Date: Fri, 15 Mar 2013 23:40:00 GMT Resent-Message-Id: <201303152340.r2FNe0JQ056241@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Godfrey van der Linden Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7C3E275A for ; Fri, 15 Mar 2013 23:30:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 6E17E61A for ; Fri, 15 Mar 2013 23:30:51 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2FNUpxo070916 for ; Fri, 15 Mar 2013 23:30:51 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r2FNUoDL070915; Fri, 15 Mar 2013 23:30:50 GMT (envelope-from nobody) Message-Id: <201303152330.r2FNUoDL070915@red.freebsd.org> Date: Fri, 15 Mar 2013 23:30:50 GMT From: Godfrey van der Linden To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/177008: kmod.mk: EXPORT_SYMS make variable is broken for more than one symbol X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2013 23:40:01 -0000 >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: