Skip to content

Commit

Permalink
kmod.mk use ${XARGS}
Browse files Browse the repository at this point in the history
Also ${XARGS_J} this allows use of non-BSD xargs when building
kernel modules.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45146
  • Loading branch information
sgerraty committed May 10, 2024
1 parent 50884a0 commit dd4d206
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sys/conf/kmod.mk
Expand Up @@ -71,6 +71,8 @@ KMODLOAD?= /sbin/kldload
KMODUNLOAD?= /sbin/kldunload
KMODISLOADED?= /sbin/kldstat -q -n
OBJCOPY?= objcopy
XARGS?= xargs
XARGS_J?= -J

.include "kmod.opts.mk"
.include <bsd.sysdir.mk>
Expand Down Expand Up @@ -275,12 +277,12 @@ ${FULLPROG}: ${OBJS} ${BLOB_OBJS}
grep -v '^#' < ${EXPORT_SYMS} > export_syms
.endif
${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \
export_syms | xargs -J% ${OBJCOPY} % ${.TARGET}
export_syms | ${XARGS} ${XARGS_J} % ${OBJCOPY} % ${.TARGET}
.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}
${.TARGET} /dev/null | ${XARGS} ${XARGS_J} % ${OBJCOPY} % ${.TARGET}
.endif
.if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no
${OBJCOPY} --strip-debug ${.TARGET}
Expand Down

0 comments on commit dd4d206

Please sign in to comment.