Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2017 12:22:29 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321684 - head
Message-ID:  <201707291222.v6TCMT0T046863@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707291222.v6TCMT0T046863>