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
This commit is contained in:
parent
a34806ae5e
commit
4820136b6a
@ -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"},
|
@ -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"},
|
||||
|
4
usr.bin/clang/clang/CC.sh
Executable file
4
usr.bin/clang/clang/CC.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
# This file is in the public domain.
|
||||
exec /usr/bin/c++ "$@"
|
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user