Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external Extend LLVM link.mk to handle librt. Use it in Gall...
details: https://anonhg.NetBSD.org/src/rev/f0ae78f8c646
branches: trunk
changeset: 450347:f0ae78f8c646
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Apr 10 20:32:56 2019 +0000
description:
Extend LLVM link.mk to handle librt. Use it in Gallium.
diffstat:
external/bsd/llvm/link.mk | 10 +++++++++-
external/mit/xorg/lib/gallium/Makefile | 19 ++++++-------------
2 files changed, 15 insertions(+), 14 deletions(-)
diffs (88 lines):
diff -r 76718c7f6e59 -r f0ae78f8c646 external/bsd/llvm/link.mk
--- a/external/bsd/llvm/link.mk Wed Apr 10 20:06:26 2019 +0000
+++ b/external/bsd/llvm/link.mk Wed Apr 10 20:32:56 2019 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: link.mk,v 1.5 2013/09/29 12:11:59 joerg Exp $
+# $NetBSD: link.mk,v 1.6 2019/04/10 20:32:56 joerg Exp $
.include <bsd.own.mk>
+LLVM_TOPLEVEL:= ${.PARSEDIR}
+
.if defined(HOSTPROG)
LIB_BASE= ${NETBSDSRCDIR}/tools/llvm-lib
.else
@@ -38,6 +40,12 @@
DPADD+= ${LLVM_OBJDIR.${l}}/libLLVM${l}.a
.endfor
+.for l in ${LLVMRT_LIBS}
+LLVMRT_OBJDIR.${l}!= cd ${LLVM_TOPLEVEL}/librt/libLLVM${l} && ${PRINTOBJDIR}
+LDADD+= ${LLVMRT_OBJDIR.${l}}/libLLVM${l}_pic.a
+DPADD+= ${LLVMRT_OBJDIR.${l}}/libLLVM${l}_pic.a
+.endfor
+
.if defined(HOSTPROG)
LDADD_NEED_DL= cat ${LLVM_TOOLCONF_OBJDIR}/need-dl 2> /dev/null
LDADD_NEED_TERMINFO= cat ${LLVM_TOOLCONF_OBJDIR}/need-terminfo 2> /dev/null
diff -r 76718c7f6e59 -r f0ae78f8c646 external/mit/xorg/lib/gallium/Makefile
--- a/external/mit/xorg/lib/gallium/Makefile Wed Apr 10 20:06:26 2019 +0000
+++ b/external/mit/xorg/lib/gallium/Makefile Wed Apr 10 20:32:56 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2019/04/07 17:31:32 christos Exp $
+# $NetBSD: Makefile,v 1.23 2019/04/10 20:32:56 joerg Exp $
# Link the gallium mega driver.
@@ -961,9 +961,7 @@
# gallium drivers requiring LLVM
.if ${BUILD_LLVMPIPE} == 1 || ${BUILD_RADEON} == 1
-LLVM_LIB_DIR!= cd ${.CURDIR}/../../../../../external/bsd/llvm/librt; ${PRINTOBJDIR}
-
-LLVM_LIBS= \
+LLVMRT_LIBS= \
TransformsCoroutines \
Passes \
MCJIT \
@@ -971,7 +969,7 @@
RuntimeDyld
.if ${BUILD_RADEON} == 1
-LLVM_LIBS+= \
+LLVMRT_LIBS+= \
AMDGPUCodeGen \
AMDGPUMCTargetDesc \
AMDGPUAsmPrinter \
@@ -982,7 +980,7 @@
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
# XXX duplicates
-LLVM_LIBS+= \
+LLVMRT_LIBS+= \
X86Disassembler \
X86CodeGen \
X86MCTargetDesc \
@@ -992,7 +990,7 @@
X86TargetInfo \
X86Utils
.endif
-LLVM_LIBS+= \
+LLVMRT_LIBS+= \
GlobalISel \
MCDisassembler \
SelectionDAG \
@@ -1020,12 +1018,7 @@
TransformsUtils \
Support
-.for llvm_library in ${LLVM_LIBS}
-dir!= cd ${LLVM_LIB_DIR}/libLLVM${llvm_library}; ${PRINTOBJDIR}
-lib= ${dir}/libLLVM${llvm_library}_pic.a
-DPADD+= ${lib}
-LDADD+= ${lib}
-.endfor
+.include "${NETBSDSRCDIR}/external/bsd/llvm/link.mk"
.endif # ${BUILD_LLVM_PIPE} == 1 || ${BUILD_RADEON} == 1
Home |
Main Index |
Thread Index |
Old Index