summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2015-10-07 00:28:24 +0000
committersjg <sjg@FreeBSD.org>2015-10-07 00:28:24 +0000
commit591790668c992749c19edbc344881a0906581930 (patch)
treed72c3a7c9634c03af3131356522bb0c6cbe950b1 /share
parentdee7614f487a246c0b2a7658fe74d9027a387574 (diff)
downloadFreeBSD-src-591790668c992749c19edbc344881a0906581930.zip
FreeBSD-src-591790668c992749c19edbc344881a0906581930.tar.gz
Do not assume host toolchain supports sysroot
Diffstat (limited to 'share')
-rw-r--r--share/mk/local.init.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/mk/local.init.mk b/share/mk/local.init.mk
index 5d71d1f..85303c3 100644
--- a/share/mk/local.init.mk
+++ b/share/mk/local.init.mk
@@ -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
OpenPOWER on IntegriCloud