<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 07/11/2013 18:18, David Chisnall
wrote:<br>
</div>
<blockquote
cite="mid:FD0E8EF1-E4A2-4627-A9DE-D4FC51E88C24@cl.cam.ac.uk"
type="cite">
<pre wrap="">
On 7 Nov 2013, at 18:05, Joerg Sonnenberger <a class="moz-txt-link-rfc2396E" href="mailto:joerg@britannica.bec.de"><joerg@britannica.bec.de></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Thu, Nov 07, 2013 at 05:58:11PM +0000, David Chisnall wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 7 Nov 2013, at 17:46, Joerg Sonnenberger <a class="moz-txt-link-rfc2396E" href="mailto:joerg@britannica.bec.de"><joerg@britannica.bec.de></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Thu, Nov 07, 2013 at 12:27:13PM -0500, Zhihao Yuan wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap="">
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.
</pre>
</blockquote>
<pre wrap="">
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.
</pre>
</blockquote>
<pre wrap="">
Provide a shell wrapper as short term workaround with a blinking red
warning that this is obsolete?
</pre>
</blockquote>
<pre wrap="">
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++.</pre>
</blockquote>
<br>
There have been good arguments both for and against the uppercase CC
entry so far but not much in the way of technical solutions
addressing concerns about case-insensitive filesystems.<br>
<br>
So how about this..<br>
<br>
Assuming we can ignore the clang-CC case, and given that the
suffixes array is searched in order, how about adding a single "CC"
entry directly after "cc" (instead of before as in the original
patch)?<br>
<br>
This way existing behaviour will be preserved on most systems
including Windows / OS X and legacy installations will still be able
to identify CC as a C++ compiler:<br>
<br>
<code>diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp</code><code><br>
</code><code>index 3a6a09b..6d30eca 100644</code><code><br>
</code><code>--- a/tools/driver/driver.cpp</code><code><br>
</code><code>+++ b/tools/driver/driver.cpp</code><code><br>
</code><code>@@ -222,6 +222,7 @@ static void
ParseProgName(SmallVectorImpl<const char *> &ArgVector,</code><code><br>
</code><code> { "clang-gcc", 0 },</code><code><br>
</code><code> { "clang-cl", "--driver-mode=cl" },</code><code><br>
</code><code> { "cc", 0 },</code><code><br>
</code><code>+ { "CC", "--driver-mode=g++" },</code><code><br>
</code><code> { "cpp", "--driver-mode=cpp" },</code><code><br>
</code><code> { "cl" , "--driver-mode=cl" },</code><code><br>
</code><code> { "++", "--driver-mode=g++" },</code><br>
<br>
I haven't tested this and don't have access to a system where this
matters, but this seems like a viable approach to investigate in
order to reduce vendor patching in FreeBSD.<br>
<br>
Alp.<br>
<br>
<br>
<br>
<blockquote
cite="mid:FD0E8EF1-E4A2-4627-A9DE-D4FC51E88C24@cl.cam.ac.uk"
type="cite">
<pre wrap="">
David
_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.nuanti.com">http://www.nuanti.com</a>
the browser experts
</pre>
</body>
</html>