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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288965

View File

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