summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/clang
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-03-05 06:04:33 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-03-05 06:04:33 +0000
commitc58faada23c1026405b50e06ebaf0484216d2708 (patch)
treee998dccc1cf1a277972259e28dc61a7b289c10c2 /gnu/usr.bin/clang
parent6bf3978e9a0c5594b0932a180981e31044f4d446 (diff)
build AMDGPU Target in addition to native
Diffstat (limited to 'gnu/usr.bin/clang')
-rw-r--r--gnu/usr.bin/clang/Makefile4
-rw-r--r--gnu/usr.bin/clang/Makefile.arch9
-rw-r--r--gnu/usr.bin/clang/include/llvm/Config/Makefile5
3 files changed, 10 insertions, 8 deletions
diff --git a/gnu/usr.bin/clang/Makefile b/gnu/usr.bin/clang/Makefile
index e35c827501c..4d763806d78 100644
--- a/gnu/usr.bin/clang/Makefile
+++ b/gnu/usr.bin/clang/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.9 2019/01/27 16:59:41 patrick Exp $
+# $OpenBSD: Makefile,v 1.10 2019/03/05 06:04:32 jsg Exp $
.include <bsd.own.mk>
@@ -53,7 +53,7 @@ SUBDIR+=libLLVMCoroutines
SUBDIR+=libLLVMDemangle
.for arch in ${LLVM_ARCHS}
-.if "${arch}" == ${LLVM_ARCH} || make(obj)
+.if "${arch}" == ${LLVM_ARCH} || "${arch}" == "AMDGPU" || make(obj)
SUBDIR+=include/llvm/${arch}
.endif
.endfor
diff --git a/gnu/usr.bin/clang/Makefile.arch b/gnu/usr.bin/clang/Makefile.arch
index 030cce62d2e..b1a1c03f629 100644
--- a/gnu/usr.bin/clang/Makefile.arch
+++ b/gnu/usr.bin/clang/Makefile.arch
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.arch,v 1.5 2018/04/06 14:44:04 patrick Exp $
+# $OpenBSD: Makefile.arch,v 1.6 2019/03/05 06:04:32 jsg Exp $
-LLVM_ARCHS=AArch64 ARM Mips PowerPC Sparc X86
+LLVM_ARCHS=AArch64 AMDGPU ARM Mips PowerPC Sparc X86
LLVM_ARCH?=
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
@@ -26,14 +26,15 @@ BACKEND_INFO?=
BACKEND_UTILS?=
.for arch in ${LLVM_ARCHS}
-.if "${arch}" == ${LLVM_ARCH} || make(obj)
+.if "${arch}" == ${LLVM_ARCH} || "${arch}" == "AMDGPU" || make(obj)
BACKEND_ASMPARSER+= LLVM${arch}AsmParser
BACKEND_ASMPRINTER+= LLVM${arch}AsmPrinter
BACKEND_CODEGEN+= LLVM${arch}CodeGen
BACKEND_DESC+= LLVM${arch}Desc
BACKEND_DISASSEMBLER+= LLVM${arch}Disassembler
BACKEND_INFO+= LLVM${arch}Info
-.if "${arch}" == "X86" || "${arch}" == "AArch64" || "${arch}" == "ARM"
+.if "${arch}" == "X86" || "${arch}" == "AArch64" || "${arch}" == "ARM" \
+ || "${arch}" == "AMDGPU"
BACKEND_UTILS+= LLVM${arch}Utils
.endif
.endif
diff --git a/gnu/usr.bin/clang/include/llvm/Config/Makefile b/gnu/usr.bin/clang/include/llvm/Config/Makefile
index 33c9474ace3..a4fb09e6dce 100644
--- a/gnu/usr.bin/clang/include/llvm/Config/Makefile
+++ b/gnu/usr.bin/clang/include/llvm/Config/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2017/07/09 15:28:34 espie Exp $
+# $OpenBSD: Makefile,v 1.4 2019/03/05 06:04:32 jsg Exp $
.include <bsd.own.mk>
@@ -21,6 +21,7 @@ AsmPrinters.def:
Disassemblers.def:
printf "LLVM_DISASSEMBLER(${LLVM_ARCH})\n#undef LLVM_DISASSEMBLER\n" >$@
Targets.def:
- printf "LLVM_TARGET(${LLVM_ARCH})\n#undef LLVM_TARGET\n" >$@
+ printf "LLVM_TARGET(AMDGPU)\n" >$@
+ printf "LLVM_TARGET(${LLVM_ARCH})\n#undef LLVM_TARGET\n" >>$@
.include <bsd.obj.mk>