Hi,
in architectures which use clang by default we should provide clang as
cc, c++ and cpp as well. Also lld should be called ld.
ok?
Patrick
diff --git a/gnu/usr.bin/clang/clang/Makefile b/gnu/usr.bin/clang/clang/Makefile
index b16aaa5e67c..104f7c593f1 100644
--- a/gnu/usr.bin/clang/clang/Makefile
+++ b/gnu/usr.bin/clang/clang/Makefile
@@ -1,7 +1,10 @@
# $OpenBSD: Makefile,v 1.2 2017/01/14 20:12:41 patrick Exp $
+.include <bsd.own.mk>
+
PROG= clang
BINDIR= /usr/bin
+LIBEXECDIR=/usr/libexec
SRCS= driver.cpp \
cc1_main.cpp \
cc1as_main.cpp
@@ -14,6 +17,15 @@ LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \
MLINKS= clang.1 clang++.1 \
clang.1 clang-cpp.1
+.if ${COMPILER_VERSION:L} == "clang"
+LINKS+= ${BINDIR}/clang ${BINDIR}/cc \
+ ${BINDIR}/clang ${BINDIR}/c++ \
+ ${BINDIR}/clang ${LIBEXECDIR}/cpp
+MLINKS= clang.1 cc.1 \
+ clang.1 c++.1 \
+ clang.1 cpp.1
+.endif
+
CPPFLAGS+= -I${.CURDIR}/../../../llvm/tools/clang/include
.PATH: ${.CURDIR}/../../../llvm/tools/clang/tools/driver
diff --git a/gnu/usr.bin/clang/lld/Makefile b/gnu/usr.bin/clang/lld/Makefile
index 07233e26223..83400e3a67c 100644
--- a/gnu/usr.bin/clang/lld/Makefile
+++ b/gnu/usr.bin/clang/lld/Makefile
@@ -1,5 +1,7 @@
# $OpenBSD: Makefile,v 1.2 2017/01/14 20:12:41 patrick Exp $
+.include <bsd.own.mk>
+
PROG= lld
BINDIR= /usr/bin
SRCS= lld.cpp
@@ -8,6 +10,8 @@ NOMAN=
LDADD+= -ltermlib
DPADD+= ${LIBTERMLIB}
+LINKS= ${BINDIR}/lld ${BINDIR}/ld
+
CPPFLAGS+= ${CLANG_INCLUDES}
CPPFLAGS+= -I${.CURDIR}/../../../llvm/tools/lld/include