[cfe-dev] Recognize CC and clang-CC?

David Chisnall David.Chisnall at cl.cam.ac.uk
Thu Nov 7 10:18:53 PST 2013


On 7 Nov 2013, at 18:05, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:

> On Thu, Nov 07, 2013 at 05:58:11PM +0000, David Chisnall wrote:
>> On 7 Nov 2013, at 17:46, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
>> 
>>> On Thu, Nov 07, 2013 at 12:27:13PM -0500, Zhihao Yuan wrote:
>>>> The upper case CC is a traditional UNIX naming of
>>>> C++ compiler.  BSDs follow this, and cmake regards
>>>> it as the host C++ compiler as well.
>>> 
>>> NetBSD doesn't. I'm moderately sure OpenBSD and DragonFly don't either.
>>> Frankly, I don't know what tradition outside FreeBSD you are talking
>>> about -- pretty much everyone has been using "c++" as canonical name for
>>> the C++ compiler for ages.
>> 
>> It's an IRIXism.  We're going to be removing CC soon, but for
>> compatibility it would be nice to have this in, incase users decide
>> to install the CC -> clang symlink themselves.
> 
> Provide a shell wrapper as short term workaround with a blinking red
> warning that this is obsolete?

This patch is already applied to clang in the FreeBSD tree.  It would be nice if it were also applied upstream, so that there are no surprises for people who like CC.

For some reason, CMake prefers CC to c++ when it finds both, and this has caused problems building things that use CMake and C++.

David





More information about the cfe-dev mailing list