Pass CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS to the main crunch exec build.

This fixes --sysroot and other CFLAGS/LDFLAGS not being respected
in the crunchgen build since it is not including bsd.sys.mk and
other files.  For example, this fixes building rescue itself without
--sysroot and other CFLAGS.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-05-26 23:20:27 +00:00
parent a13e2ac519
commit ec02e5e3ba

View File

@ -114,7 +114,10 @@ ${OUTPUTS}: ${CONF}
# These 2 targets cannot use .MAKE since they depend on the generated
# ${OUTMK} above.
${PROG}: ${OUTPUTS} objs
${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} exe
${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \
CC="${CC} ${CFLAGS} ${LDFLAGS}" \
CXX="${CXX} ${CXXFLAGS} ${LDFLAGS}" \
${MAKE} -f ${OUTMK} exe
objs: ${OUTMK}
${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} objs