Do not assume host toolchain supports sysroot

This commit is contained in:
Simon J. Gerraty 2015-10-07 00:28:24 +00:00
parent eef72759b5
commit 857b8cc71d

View File

@ -9,11 +9,12 @@
.endif .endif
.endif .endif
.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) .if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host"
CFLAGS_LAST+= --sysroot=${SYSROOT} CFLAGS_LAST+= --sysroot=${SYSROOT}
CXXFLAGS_LAST+= --sysroot=${SYSROOT} CXXFLAGS_LAST+= --sysroot=${SYSROOT}
LDADD+= --sysroot=${SYSROOT} LDADD+= --sysroot=${SYSROOT}
.elif ${MK_STAGING} == "yes" .elif ${MK_STAGING} == "yes"
CFLAGS+= -nostdinc
CFLAGS+= -I${STAGE_INCLUDEDIR} CFLAGS+= -I${STAGE_INCLUDEDIR}
LDADD+= -L${STAGE_LIBDIR} LDADD+= -L${STAGE_LIBDIR}
.endif .endif