summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc18
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index e5e29e7..2503da3 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -527,7 +527,13 @@ TARGET_ABI= gnueabihf
TARGET_ABI= gnueabi
.endif
.endif
-.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == "clang"
+.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
+# GCC requires -isystem and -L when using a cross-compiler.
+XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
+# Force using libc++ for external GCC.
+XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
+ -nostdinc++ -L${WORLDTMP}/../lib/libc++
+.else
TARGET_ABI?= unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XCFLAGS+= -target ${TARGET_TRIPLE}
OpenPOWER on IntegriCloud