From 09210a281cf7155a1667450b6a9f8da37eeaed95 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 27 May 2016 20:45:32 +0000 Subject: [PATCH] After r300770, for libc++ and libcxxrt, use -isystem instead of -I. This should fix builds with external gcc toolchains from ports, which also use -isystem to work around problems with gcc's --sysroot implementation. Thanks to Bryan Drewery for this workaround. --- lib/libc++/Makefile | 2 +- lib/libcxxrt/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 984e70bebe87..5db093488d24 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -63,7 +63,7 @@ cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA .endfor WARNS= 0 -CFLAGS+= -I${HDRDIR} -I${_LIBCXXRTDIR} -nostdinc++ -nostdlib -DLIBCXXRT +CFLAGS+= -isystem ${HDRDIR} -isystem ${_LIBCXXRTDIR} -nostdinc++ -nostdlib -DLIBCXXRT .if empty(CXXFLAGS:M-std=*) CXXFLAGS+= -std=c++11 .endif diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile index 15420a692b9f..f2efe8db541f 100644 --- a/lib/libcxxrt/Makefile +++ b/lib/libcxxrt/Makefile @@ -21,7 +21,7 @@ SRCS+= libelftc_dem_gnu3.c\ guard.cc WARNS= 0 -CFLAGS+= -I${SRCDIR} -nostdinc++ +CFLAGS+= -isystem ${SRCDIR} -nostdinc++ .if empty(CXXFLAGS:M-std=*) CXXFLAGS+= -std=c++11 .endif