Libcompat: Only pass -isystem =/usr/include for external GCC.

This is the same as the main build logic.  GCC with a cross-compiler
requires using -isystem to =/usr/include to get the search order
correct.

Reported by:	dim, asomers
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-05-27 23:03:28 +00:00
parent dfdbdb0c82
commit 47873c16d3

View File

@ -72,10 +72,9 @@ LIBCOMPATCFLAGS+= ${LIBCOMPATCPUFLAGS} \
# -B is needed to find /usr/lib32/crti.o for GCC and /usr/libsoft/crti.o for
# Clang/GCC.
LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat}
.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
# GCC requires -isystem when using a cross-compiler.
LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include
.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
# Force using libc++ for external GCC.
LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \
-nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++