svn commit: r329373 - head/sys/conf
Ed Maste
emaste at FreeBSD.org
Fri Feb 16 15:38:03 UTC 2018
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}
More information about the svn-src-all
mailing list