From 47873c16d3c25ea1be4c426dafb013703a305e3f Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 27 May 2016 23:03:28 +0000 Subject: [PATCH] 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 --- Makefile.libcompat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.libcompat b/Makefile.libcompat index 2cbaf2e0f19..c9662346740 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -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++