svn commit: r321684 - head

Dimitry Andric dim at FreeBSD.org
Sat Jul 29 12:22:31 UTC 2017


Author: dim
Date: Sat Jul 29 12:22:29 2017
New Revision: 321684
URL: https://svnweb.freebsd.org/changeset/base/321684

Log:
  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

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Sat Jul 29 11:27:54 2017	(r321683)
+++ head/Makefile.inc1	Sat Jul 29 12:22:29 2017	(r321684)
@@ -624,8 +624,7 @@ XCFLAGS+=	-isystem ${WORLDTMP}/usr/include -L${WORLDTM
 # 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


More information about the svn-src-head mailing list