Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2018 15:38:02 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329373 - head/sys/conf
Message-ID:  <201802161538.w1GFc26r059102@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri Feb 16 15:38:02 2018
New Revision: 329373
URL: https://svnweb.freebsd.org/changeset/base/329373

Log:
  Correct module symbol export handling
  
  EXPORT_SYMS can be set to YES, NO, a list of symbols to export from a
  module, or to a filename containing such a list.  For the case that it
  is set to a symbol list, replace spaces in the list with newlines, so
  the created file is in the format expected by kmod_syms.awk.
  
  Reviewed by:	imp, jhb
  MFC after:	1 month
  Sponsored by:	Turing Robotic Industries Inc.
  Differential Revision:	https://reviews.freebsd.org/D14284

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Fri Feb 16 15:37:33 2018	(r329372)
+++ head/sys/conf/kmod.mk	Fri Feb 16 15:38:02 2018	(r329373)
@@ -243,14 +243,14 @@ ${FULLPROG}: ${OBJS}
 .if ${EXPORT_SYMS} == NO
 	:> export_syms
 .elif !exists(${.CURDIR}/${EXPORT_SYMS})
-	echo ${EXPORT_SYMS} > export_syms
+	echo -n "${EXPORT_SYMS:@s@$s${.newline}@}" > export_syms
 .else
 	grep -v '^#' < ${EXPORT_SYMS} > export_syms
 .endif
 	${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \
 	    export_syms | xargs -J% ${OBJCOPY} % ${.TARGET}
 .endif
-.endif
+.endif # defined(EXPORT_SYMS)
 .if defined(PREFIX_SYMS)
 	${AWK} -v prefix=${PREFIX_SYMS} -f ${SYSDIR}/conf/kmod_syms_prefix.awk \
 	    ${.TARGET} /dev/null | xargs -J% ${OBJCOPY} % ${.TARGET}



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