bin/182442: [regression][patch] 'CC' (clang) binary is invoked in C mode, not C++; breaks devel/cmake
Jan Beich
jbeich at tormail.org
Fri Sep 27 12:10:02 UTC 2013
>Number: 182442
>Category: bin
>Synopsis: [regression][patch] 'CC' (clang) binary is invoked in C mode, not C++; breaks devel/cmake
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Sep 27 12:10:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Jan Beich
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
CC was a hardlink to g++ before r242624
>Description:
>How-To-Repeat:
$ cat CMakeLists.txt
project(foo)
cmake_minimum_required(VERSION 2.8)
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("
#include <cmath>
int main() {
std::isnan(5);
return 0;
}
" STD_ISNAN_ACCEPTS_INTEGER)
$ cmake .
-- The C compiler identification is Clang 3.3.0
-- The CXX compiler identification is Clang 3.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/CC
-- Check for working CXX compiler: /usr/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test STD_ISNAN_ACCEPTS_INTEGER
-- Performing Test STD_ISNAN_ACCEPTS_INTEGER - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/cwd
>Fix:
--- invoke_in_cxx_mode.diff begins here ---
Index: contrib/llvm/tools/clang/tools/driver/driver.cpp
===================================================================
--- contrib/llvm/tools/clang/tools/driver/driver.cpp (revision 255808)
+++ contrib/llvm/tools/clang/tools/driver/driver.cpp (working copy)
@@ -284,11 +284,13 @@ static void ParseProgName(SmallVectorImpl<const ch
} suffixes [] = {
{ "clang", false, false },
{ "clang++", true, false },
+ { "clang-CC", true, false },
{ "clang-c++", true, false },
{ "clang-cc", false, false },
{ "clang-cpp", false, true },
{ "clang-g++", true, false },
{ "clang-gcc", false, false },
+ { "CC", true, false },
{ "cc", false, false },
{ "cpp", false, true },
{ "++", true, false },
--- invoke_in_cxx_mode.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list