Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2015 11:03:26 +0000
From:      "theraven (David Chisnall)" <phabric-noreply@FreeBSD.org>
To:        freebsd-toolchain@freebsd.org
Subject:   [Differential] [Commented On] D1932: Remove the non-standard CC alias for c++
Message-ID:  <7677f2b13908cac5b68215bdddafcb02@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-p7tpzdep6ftjyr4g7dv7-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-p7tpzdep6ftjyr4g7dv7-req@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
theraven added a comment.

It is problematic for the compiler to differentiate between being invoked as CC and as cc (clang and gcc both have to work on case-insensitive filesystems).  The convention to have CC as an alias for c++ comes from some SysV platforms (though not from Linux, which does not install the CC alias).  On OS X, cc and CC are the same file, as the filesystem is case preserving but not case sensitive.

As a result of this, we have been carrying around patches to clang to make it detect that it is being invoked as CC for a while, to avoid breaking every single cmake-built C++ program (a few hundred ports) that defaults to CC as the C++ compiler (for Solaris/IRIX compatibility), but will happily fall back to using c++ instead.

Aside from the cost of maintaining this patch, this also adds a place where the obj dir / install sysroot must be on a case-sensitive filesystem, which harms attempts to make FreeBSD cross-buildable from OS X / Windows (we are careful to avoid this requirement for the src tree and have an svn hook to prevent it).

The CC alias does not work on Linux or OS X, so the likelihood of this breaking third-party code is minimal and the pain that it has already caused is nontrivial.


REPOSITORY
  rS FreeBSD src repository

REVISION DETAIL
  https://reviews.freebsd.org/D1932

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: dim, emaste, theraven, imp
Cc: kib, imp, freebsd-toolchain



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