From 31dd9effd91ca134be7bcaabee571765c265a671 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 29 May 2016 01:15:15 +0000 Subject: [PATCH] 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 --- usr.bin/xlint/llib/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/usr.bin/xlint/llib/Makefile b/usr.bin/xlint/llib/Makefile index bcf93c4118a..df79a752936 100644 --- a/usr.bin/xlint/llib/Makefile +++ b/usr.bin/xlint/llib/Makefile @@ -16,6 +16,15 @@ llib-lstdc.ln: llib-lstdc .include -.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