summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/clang/clang/Makefile12
-rw-r--r--gnu/usr.bin/clang/lld/Makefile6
2 files changed, 16 insertions, 2 deletions
diff --git a/gnu/usr.bin/clang/clang/Makefile b/gnu/usr.bin/clang/clang/Makefile
index abcea324280..a39570a1371 100644
--- a/gnu/usr.bin/clang/clang/Makefile
+++ b/gnu/usr.bin/clang/clang/Makefile
@@ -1,9 +1,10 @@
-# $OpenBSD: Makefile,v 1.3 2017/01/22 03:56:33 jsg Exp $
+# $OpenBSD: Makefile,v 1.4 2017/01/22 06:07:21 patrick Exp $
.include <bsd.own.mk>
PROG= clang
BINDIR= /usr/bin
+LIBEXECDIR=/usr/libexec
SRCS= driver.cpp \
cc1_main.cpp \
cc1as_main.cpp
@@ -16,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 7099b2f40b2..b4373f06145 100644
--- a/gnu/usr.bin/clang/lld/Makefile
+++ b/gnu/usr.bin/clang/lld/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2017/01/22 06:00:14 patrick Exp $
+# $OpenBSD: Makefile,v 1.4 2017/01/22 06:07:21 patrick Exp $
.include <bsd.own.mk>
@@ -10,6 +10,10 @@ NOMAN=
LDADD+= -ltermlib
DPADD+= ${LIBTERMLIB}
+.if ${COMPILER_VERSION:L} == "clang"
+LINKS= ${BINDIR}/ld.lld ${BINDIR}/ld
+.endif
+
CPPFLAGS+= ${CLANG_INCLUDES}
CPPFLAGS+= -I${.CURDIR}/../../../llvm/tools/lld/include