Don't use libc++ when cross-building for gcc arches
Since we imported clang 5.0.0, the version check in Makefile.inc1 which checks whether to use libc++ fires even when the compiler for the target architecture is gcc 4.2.1. This is because only X_COMPILER_VERSION is checked. Also check X_COMPILER_TYPE, so it will only use libc++ when an external gcc toolchain is used. Reviewed by: emaste, rpokala MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D11776
This commit is contained in:
parent
83699dfd09
commit
1681d1de13
@ -624,8 +624,7 @@ XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
|
||||
# combined with --sysroot.
|
||||
XCFLAGS+= -B${WORLDTMP}/usr/lib
|
||||
# Force using libc++ for external GCC.
|
||||
# XXX: This should be checking MK_GNUCXX == no
|
||||
.if ${X_COMPILER_VERSION} >= 40800
|
||||
.if ${X_COMPILER_TYPE} == gcc && ${X_COMPILER_VERSION} >= 40800
|
||||
XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
|
||||
-nostdinc++
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user