diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-25 07:29:31 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-25 07:29:31 +0000 |
commit | 2eaee754922218498bc629e384fce400e3d4c652 (patch) | |
tree | 57e123e2517e0e6212cc8b61e32da422a6d562f7 /gnu | |
parent | 960502661a6f7a5c8b54d24737e667900223ee9e (diff) |
Descend into the arch specific subdirectory for every arch on
make obj. This will enable us to add clang to the build.
"if it works" kettenis@
ok jsg@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/clang/Makefile | 8 | ||||
-rw-r--r-- | gnu/usr.bin/clang/Makefile.arch | 35 |
2 files changed, 30 insertions, 13 deletions
diff --git a/gnu/usr.bin/clang/Makefile b/gnu/usr.bin/clang/Makefile index 96e12d3bb9a..0da60613221 100644 --- a/gnu/usr.bin/clang/Makefile +++ b/gnu/usr.bin/clang/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2017/01/24 08:44:47 patrick Exp $ +# $OpenBSD: Makefile,v 1.5 2017/01/25 07:29:30 patrick Exp $ .include <bsd.own.mk> @@ -48,7 +48,11 @@ SUBDIR+=libLLVMPasses SUBDIR+=libLLVMCoroutines SUBDIR+=libLLVMDemangle -SUBDIR+=include/llvm/${LLVM_ARCH} +.for arch in ${LLVM_ARCHS} +.if "${arch}" == ${LLVM_ARCH} || make(obj) +SUBDIR+=include/llvm/${arch} +.endif +.endfor .for _l in ${BACKEND_LIBS} SUBDIR+=lib${_l} diff --git a/gnu/usr.bin/clang/Makefile.arch b/gnu/usr.bin/clang/Makefile.arch index bc4a8cbff44..9ba43ab3ef5 100644 --- a/gnu/usr.bin/clang/Makefile.arch +++ b/gnu/usr.bin/clang/Makefile.arch @@ -1,5 +1,8 @@ -# $OpenBSD: Makefile.arch,v 1.2 2016/11/24 22:32:29 patrick Exp $ +# $OpenBSD: Makefile.arch,v 1.3 2017/01/25 07:29:30 patrick Exp $ +LLVM_ARCHS=AArch64 ARM PowerPC Sparc X86 + +LLVM_ARCH?= .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" LLVM_ARCH= X86 .elif ${MACHINE_ARCH} == "powerpc" @@ -14,17 +17,27 @@ LLVM_ARCH= ARM LLVM_ARCH= Mips .endif -.if !(${LLVM_ARCH} == "X86" || ${LLVM_ARCH} == "AArch64") -BACKEND_UTILS= -.endif +BACKEND_ASMPARSER?= +BACKEND_ASMPRINTER?= +BACKEND_CODEGEN?= +BACKEND_DESC?= +BACKEND_DISASSEMBLER?= +BACKEND_INFO?= +BACKEND_UTILS?= -BACKEND_ASMPARSER?= LLVM${LLVM_ARCH}AsmParser -BACKEND_ASMPRINTER?= LLVM${LLVM_ARCH}AsmPrinter -BACKEND_CODEGEN?= LLVM${LLVM_ARCH}CodeGen -BACKEND_DESC?= LLVM${LLVM_ARCH}Desc -BACKEND_DISASSEMBLER?= LLVM${LLVM_ARCH}Disassembler -BACKEND_INFO?= LLVM${LLVM_ARCH}Info -BACKEND_UTILS?= LLVM${LLVM_ARCH}Utils +.for arch in ${LLVM_ARCHS} +.if "${arch}" == ${LLVM_ARCH} || 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" +BACKEND_UTILS+= LLVM${arch}Utils +.endif +.endif +.endfor BACKEND_LIBS+= ${BACKEND_ASMPARSER} BACKEND_LIBS+= ${BACKEND_ASMPRINTER} |