Fix with external GCC after r300886.

Somehow the /usr/include path got lost in this particular case.
Just pass it along from --sysroot as was already done for
DIRDEPS_BUILD.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-05-29 01:15:15 +00:00
parent fdd9048a63
commit 31dd9effd9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300920

View file

@ -16,6 +16,15 @@ llib-lstdc.ln: llib-lstdc
.include <bsd.prog.mk>
.if ${MK_DIRDEPS_BUILD} == "yes"
.if !empty(STAGE_INCLUDEDIR)
LINTFLAGS+= -I${STAGE_INCLUDEDIR}
.else
.if ${CFLAGS:M--sysroot=*} != ""
_sysroot?= ${CFLAGS:M--sysroot=*:[1]:C,^--sysroot=,,}
.elif ${CC:M--sysroot=*} != ""
_sysroot?= ${CC:M--sysroot=*:[1]:C,^--sysroot=,,}
.endif
.if !empty(_sysroot)
LINTFLAGS+= -I${_sysroot}/usr/include
.endif
.endif