diff options
author | Ed Maste <emaste@FreeBSD.org> | 2018-02-16 15:38:02 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2018-02-16 15:38:02 +0000 |
commit | b8283138cd6ea2802bb8dbaef1ad08310171bde6 (patch) | |
tree | 161637f3156411b469657aba7e0776b0c6ef75e5 /sys/conf/kmod.mk | |
parent | 219ff59ce2aa98aba83abbcc3b1d66e9786b93b6 (diff) | |
download | src-b8283138cd6ea2802bb8dbaef1ad08310171bde6.tar.gz src-b8283138cd6ea2802bb8dbaef1ad08310171bde6.zip |
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
Notes
Notes:
svn path=/head/; revision=329373
Diffstat (limited to 'sys/conf/kmod.mk')
-rw-r--r-- | sys/conf/kmod.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 9194108afb20..c11b7ab4fe72 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -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} |