svn commit: r300920 - head/usr.bin/xlint/llib

Bryan Drewery bdrewery at FreeBSD.org
Sun May 29 01:15:17 UTC 2016


Author: bdrewery
Date: Sun May 29 01:15:15 2016
New Revision: 300920
URL: https://svnweb.freebsd.org/changeset/base/300920

Log:
  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

Modified:
  head/usr.bin/xlint/llib/Makefile

Modified: head/usr.bin/xlint/llib/Makefile
==============================================================================
--- head/usr.bin/xlint/llib/Makefile	Sun May 29 00:40:29 2016	(r300919)
+++ head/usr.bin/xlint/llib/Makefile	Sun May 29 01:15:15 2016	(r300920)
@@ -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


More information about the svn-src-head mailing list