mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 05:36:10 +00:00
libmagic: Use HOST_CC when compiling hostprog used by build
The "mkmagic" program should be built with the host compiler. Only use BTOOLSPATH if not building for host Obtained from: Juniper Networks, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D44539
This commit is contained in:
parent
a6d8dcb0d9
commit
39f6f6f1c6
|
@ -59,12 +59,13 @@ magic.mgc: magic
|
|||
CLEANFILES+= mkmagic
|
||||
DEPENDOBJS+= mkmagic
|
||||
build-tools: mkmagic
|
||||
# For the non-dirdeps build, HOST_CC is CC by default
|
||||
mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BUILD_TOOLS_META}
|
||||
${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} \
|
||||
${HOST_CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} \
|
||||
${.ALLSRC:N*.h:O:u} ${LDADD}
|
||||
|
||||
.endif
|
||||
.if ${MK_DIRDEPS_BUILD} == "yes"
|
||||
.if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host"
|
||||
BTOOLSPATH= ${HOST_OBJTOP}/${RELDIR}
|
||||
.else
|
||||
magic.mgc: mkmagic
|
||||
|
|
Loading…
Reference in a new issue