From a7c054165db900ce4a4aa17ccdf0c2c8cebbc717 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 6 Mar 2017 20:25:37 +0100 Subject: dev-util/lldb: Bump to 4.0.0rc3, fix tests --- dev-util/lldb/Manifest | 4 +- ...nding-LLDB-tools-when-building-stand-alon.patch | 102 ++++++++++++++++++ dev-util/lldb/lldb-4.0.0_rc2.ebuild | 112 ------------------- dev-util/lldb/lldb-4.0.0_rc3.ebuild | 119 +++++++++++++++++++++ 4 files changed, 223 insertions(+), 114 deletions(-) create mode 100644 dev-util/lldb/files/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch delete mode 100644 dev-util/lldb/lldb-4.0.0_rc2.ebuild create mode 100644 dev-util/lldb/lldb-4.0.0_rc3.ebuild (limited to 'dev-util/lldb') diff --git a/dev-util/lldb/Manifest b/dev-util/lldb/Manifest index 83740582350b..c0bf1a500a42 100644 --- a/dev-util/lldb/Manifest +++ b/dev-util/lldb/Manifest @@ -1,2 +1,2 @@ -DIST lldb-4.0.0rc2.src.tar.xz 19122472 SHA256 07cce3289d97a8f7fbd069e8105fecf722fb3631d9b0822a5b1dacf0d7a1713c SHA512 bafd5eb02b4336e64b2affd140d6f77394cd54a62ebc475cf4ee6531dcd382e4455955c7d3c0d569b057b7dbabf5b7f15bcf6bdfce4bc5c52b8801b9fc1530c7 WHIRLPOOL 78d53ce49226a773e6f69c6c0663df67a895620c33d538f2a1bf1c17bbb25c0d0a175c1e670f363bfb93bd36a0cf769623b6eb8eafdee46dc08e9df97272cbc1 -DIST llvm-4.0.0rc2.src.tar.xz 21005416 SHA256 2257faed3795fedfc509d6dd5905be158231c508c6fcaaa02e4a09c5e8dadbe1 SHA512 537356226123b8c9454ec3dfc3adbfb13cfa4bd35f530b85f2b3242391ea1fbd9abf65dfbb62db533e6eae4c9049bb260fb21dccfeb7e355306f4621d35474b7 WHIRLPOOL d79f343ca00c60dd49a3ada4808e779c45210ab03e365e614563b54879ac72b7e80b4022641db10ad2075a0d417ba7c182f9d3abf8c6b012622c0d1541a7dc69 +DIST lldb-4.0.0rc3.src.tar.xz 19123208 SHA256 e74352fabc0f76556e360fa3b7e971665931bebde3ce7f437ff2714a8f9f20e3 SHA512 5b06768a9d464754e0a18486b5e0fda3f9198291040c0e179d09a37772c6e68e2f5ac2a08a6b384d2e72b685bd8b36d3b2a085213b1d347b5cbaacfa9f62db1a WHIRLPOOL 643633baa634f32b1c4551a86fa3252642bd7f61c3c6d7e6bdbc0b983e6ccce6f3f8e5c8eeb88b40a41c7937d50346b574ea8329f5badfac08ccad98ce2fa556 +DIST llvm-4.0.0rc3.src.tar.xz 21013952 SHA256 6727c98f436581adc6b8f9c2ad055d8e27832f60a127e97b3451eba85ef28345 SHA512 a64eaf59388be6641b6d654ceddd63232f83ad50226204255a0c9bcc3d1b36470f7acbf43615b2bd9758cd6077f55fc6155803a12947e1bd2be5661e1ff07e4a WHIRLPOOL 7aef4913c8a33ff0e35670063cb26ddd5d7b72cb08c699116dd93c72f25b6b75187bdf6bfd63b3d3b5c964c118c2db71893024524b864412f4f8daa594be7faa diff --git a/dev-util/lldb/files/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch b/dev-util/lldb/files/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch new file mode 100644 index 000000000000..1b183d860a2d --- /dev/null +++ b/dev-util/lldb/files/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch @@ -0,0 +1,102 @@ +From 6a9aab954c32a2d3d13a0fe5fc984e9787e9f794 Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Sun, 19 Feb 2017 22:11:38 +0000 +Subject: [PATCH] [test] Fix finding LLDB tools when building stand-alone + +Use both LLDB- and LLVM-specific tool/library directories when LLDB is +being built stand-alone. This ensures that the freshly-built tools +(and libraries) are used correctly. + +Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR +to locate lldb, and set PATH and LD_LIBRARY_PATH. When doing +a stand-alone build, these variables represent the installed LLVM. +As a result, tests either fail due to missing lldb executable +or use an earlier installed LLDB version rather than the one being +built. + +To solve this, additional LLDB_TOOLS_DIR and LLDB_LIBS_DIR variables +are added and populated using LLVM_*_OUTPUT_INTDIR. Those variables +contain directories used to output built executables and libraries. +In stand-alone builds, they represent the build-tree directories +used by LLDB. In integrated builds, they have the same values as +LLVM_*_DIR and therefore using them does not harm. + +The new variables are prepended to PATH and LD_LIBRARY_PATH to ensure +that freshly built binaries are preferred over potentially earlier +installed ones. Furthermore, paths used to locate various tools are +updated to match appropriate locations. + +Differential Revision: https://reviews.llvm.org/D29985 + +git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@295621 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lit/lit.cfg | 18 ++++++++++++------ + lit/lit.site.cfg.in | 2 ++ + 2 files changed, 14 insertions(+), 6 deletions(-) + +diff --git a/lit/lit.cfg b/lit/lit.cfg +index dd89b45fa..a3d5f9ca7 100644 +--- a/lit/lit.cfg ++++ b/lit/lit.cfg +@@ -39,18 +39,24 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) + + # Tweak the PATH to include the tools dir and the scripts dir. + if lldb_obj_root is not None: ++ lldb_tools_dir = getattr(config, 'lldb_tools_dir', None) ++ if not lldb_tools_dir: ++ lit_config.fatal('No LLDB tools dir set!') + llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) + if not llvm_tools_dir: + lit_config.fatal('No LLVM tools dir set!') +- path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) ++ path = os.path.pathsep.join((lldb_tools_dir, llvm_tools_dir, config.environment['PATH'])) + path = os.path.pathsep.join((os.path.join(getattr(config, 'llvm_src_root', None),'test','Scripts'),path)) + + config.environment['PATH'] = path + ++ lldb_libs_dir = getattr(config, 'lldb_libs_dir', None) ++ if not lldb_libs_dir: ++ lit_config.fatal('No LLDB libs dir set!') + llvm_libs_dir = getattr(config, 'llvm_libs_dir', None) + if not llvm_libs_dir: + lit_config.fatal('No LLVM libs dir set!') +- path = os.path.pathsep.join((llvm_libs_dir, ++ path = os.path.pathsep.join((lldb_libs_dir, llvm_libs_dir, + config.environment.get('LD_LIBRARY_PATH',''))) + config.environment['LD_LIBRARY_PATH'] = path + +@@ -115,14 +121,14 @@ if config.test_exec_root is None: + # Register substitutions + config.substitutions.append(('%python', config.python_executable)) + +-debugserver = lit.util.which('debugserver', llvm_tools_dir) +-lldb = lit.util.which('lldb', llvm_tools_dir) ++debugserver = lit.util.which('debugserver', lldb_tools_dir) ++lldb = lit.util.which('lldb', lldb_tools_dir) + + if not os.path.exists(config.cc): +- config.cc = lit.util.which(config.cc, llvm_tools_dir) ++ config.cc = lit.util.which(config.cc, config.environment['PATH']) + + if not os.path.exists(config.cxx): +- config.cxx = lit.util.which(config.cxx, llvm_tools_dir) ++ config.cxx = lit.util.which(config.cxx, config.environment['PATH']) + + if platform.system() in ['Darwin']: + try: +diff --git a/lit/lit.site.cfg.in b/lit/lit.site.cfg.in +index 904521c9d..03aa3df9a 100644 +--- a/lit/lit.site.cfg.in ++++ b/lit/lit.site.cfg.in +@@ -6,6 +6,8 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" + config.llvm_libs_dir = "@LLVM_LIBS_DIR@" + config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" + config.lldb_obj_root = "@LLDB_BINARY_DIR@" ++config.lldb_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" ++config.lldb_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" + config.target_triple = "@TARGET_TRIPLE@" + config.python_executable = "@PYTHON_EXECUTABLE@" + config.cc = "@CMAKE_C_COMPILER@" +-- +2.12.0 + diff --git a/dev-util/lldb/lldb-4.0.0_rc2.ebuild b/dev-util/lldb/lldb-4.0.0_rc2.ebuild deleted file mode 100644 index 199b5a600e8e..000000000000 --- a/dev-util/lldb/lldb-4.0.0_rc2.ebuild +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 -PYTHON_COMPAT=( python2_7 ) - -inherit cmake-utils llvm python-single-r1 toolchain-funcs - -DESCRIPTION="The LLVM debugger" -HOMEPAGE="http://llvm.org/" -SRC_URI="http://www.llvm.org/pre-releases/${PV/_//}/${P/_/}.src.tar.xz - test? ( http://www.llvm.org/pre-releases/${PV/_//}/llvm-${PV/_/}.src.tar.xz )" - -LICENSE="UoI-NCSA" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="libedit ncurses python test" - -RDEPEND=" - libedit? ( dev-libs/libedit:0= ) - ncurses? ( >=sys-libs/ncurses-5.9-r3:0= ) - python? ( dev-python/six[${PYTHON_USEDEP}] - ${PYTHON_DEPS} ) - ~sys-devel/clang-${PV}[xml] - ~sys-devel/llvm-${PV} - !