diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 16:14:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 16:14:30 +0000 |
commit | 4820136b6aadbc80d05702e16ef1cfc01bce3ccc (patch) | |
tree | 5c79b9ad3c8606d18c71c1bffc67a279ae8e75ca | |
parent | a34806ae5e52827216675ac0a1e0a89722756f73 (diff) | |
download | FreeBSD-src-4820136b6aadbc80d05702e16ef1cfc01bce3ccc.zip FreeBSD-src-4820136b6aadbc80d05702e16ef1cfc01bce3ccc.tar.gz |
Drop the clang patch which adds recognition of 'CC' suffixes as aliases
for --driver-mode=g++, since this was never upstreamed. For backwards
compatibility, add a wrapper shell script.
MFC after: 1 week
-rw-r--r-- | contrib/llvm/patches/patch-02-add-CC-aliases.diff | 23 | ||||
-rw-r--r-- | contrib/llvm/tools/clang/tools/driver/driver.cpp | 2 | ||||
-rwxr-xr-x | usr.bin/clang/clang/CC.sh | 4 | ||||
-rw-r--r-- | usr.bin/clang/clang/Makefile | 4 |
4 files changed, 7 insertions, 26 deletions
diff --git a/contrib/llvm/patches/patch-02-add-CC-aliases.diff b/contrib/llvm/patches/patch-02-add-CC-aliases.diff deleted file mode 100644 index 884b14c..0000000 --- a/contrib/llvm/patches/patch-02-add-CC-aliases.diff +++ /dev/null @@ -1,23 +0,0 @@ -This patch adds "CC" and "clang-CC" to the list of program name aliases which -invoke the C++ compiler. - -Introduced here: http://svnweb.freebsd.org/changeset/base/257109 - -Index: tools/clang/tools/driver/driver.cpp -=================================================================== ---- tools/clang/tools/driver/driver.cpp -+++ tools/clang/tools/driver/driver.cpp -@@ -213,11 +213,13 @@ static const DriverSuffix *FindDriverSuffix(String - {"clang", nullptr}, - {"clang++", "--driver-mode=g++"}, - {"clang-c++", "--driver-mode=g++"}, -+ {"clang-CC", "--driver-mode=g++"}, - {"clang-cc", nullptr}, - {"clang-cpp", "--driver-mode=cpp"}, - {"clang-g++", "--driver-mode=g++"}, - {"clang-gcc", nullptr}, - {"clang-cl", "--driver-mode=cl"}, -+ {"CC", "--driver-mode=g++"}, - {"cc", nullptr}, - {"cpp", "--driver-mode=cpp"}, - {"cl", "--driver-mode=cl"}, diff --git a/contrib/llvm/tools/clang/tools/driver/driver.cpp b/contrib/llvm/tools/clang/tools/driver/driver.cpp index b64fa8c..5925447 100644 --- a/contrib/llvm/tools/clang/tools/driver/driver.cpp +++ b/contrib/llvm/tools/clang/tools/driver/driver.cpp @@ -214,13 +214,11 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName) { {"clang", nullptr}, {"clang++", "--driver-mode=g++"}, {"clang-c++", "--driver-mode=g++"}, - {"clang-CC", "--driver-mode=g++"}, {"clang-cc", nullptr}, {"clang-cpp", "--driver-mode=cpp"}, {"clang-g++", "--driver-mode=g++"}, {"clang-gcc", nullptr}, {"clang-cl", "--driver-mode=cl"}, - {"CC", "--driver-mode=g++"}, {"cc", nullptr}, {"cpp", "--driver-mode=cpp"}, {"cl", "--driver-mode=cl"}, diff --git a/usr.bin/clang/clang/CC.sh b/usr.bin/clang/clang/CC.sh new file mode 100755 index 0000000..45faeec --- /dev/null +++ b/usr.bin/clang/clang/CC.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# $FreeBSD$ +# This file is in the public domain. +exec /usr/bin/c++ "$@" diff --git a/usr.bin/clang/clang/Makefile b/usr.bin/clang/clang/Makefile index 18ee730..1489a5e 100644 --- a/usr.bin/clang/clang/Makefile +++ b/usr.bin/clang/clang/Makefile @@ -18,9 +18,11 @@ LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \ MLINKS= clang.1 clang++.1 \ clang.1 clang-cpp.1 .if ${MK_CLANG_IS_CC} != "no" +SCRIPTS=CC.sh +SCRIPTSNAME=CC + LINKS+= ${BINDIR}/clang ${BINDIR}/cc \ ${BINDIR}/clang ${BINDIR}/c++ \ - ${BINDIR}/clang ${BINDIR}/CC \ ${BINDIR}/clang ${BINDIR}/cpp MLINKS+= clang.1 cc.1 \ clang.1 c++.1 \ |