From f43c5ca70c09cfc9ebef41c8f50b2074e153b1c2 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 26 Jun 2017 16:47:52 +0200 Subject: sys-devel/lld: Bump to 4.0.1 --- sys-devel/lld/Manifest | 2 + ...D-specific-binary-library-dirs-when-build.patch | 97 ---------------------- ...ib-cond-when-building-stand-alone-clean-u.patch | 82 ------------------ ...D-specific-binary-library-dirs-when-build.patch | 97 ++++++++++++++++++++++ ...ib-cond-when-building-stand-alone-clean-u.patch | 82 ++++++++++++++++++ sys-devel/lld/lld-4.0.0.ebuild | 4 +- sys-devel/lld/lld-4.0.1.ebuild | 76 +++++++++++++++++ 7 files changed, 259 insertions(+), 181 deletions(-) delete mode 100644 sys-devel/lld/files/4.0.0/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch delete mode 100644 sys-devel/lld/files/4.0.0/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch create mode 100644 sys-devel/lld/files/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch create mode 100644 sys-devel/lld/files/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch create mode 100644 sys-devel/lld/lld-4.0.1.ebuild (limited to 'sys-devel/lld') diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest index 774c61c3e342..415216e8d042 100644 --- a/sys-devel/lld/Manifest +++ b/sys-devel/lld/Manifest @@ -1,2 +1,4 @@ DIST lld-4.0.0.src.tar.xz 592728 SHA256 33e06457b9ce0563c89b11ccc7ccabf9cff71b83571985a5bf8684c9150e7502 SHA512 66b2c9cc57f5e94ad7e7da1b1bcc08cbbaee1b55c6efa64b2424b9d8776c70b842c2a31c188a99b447be6a8621ad1b1e70573bbfcf5d6b1aa986b03b3b3350f3 WHIRLPOOL 5bc86e7aa67a519939780e0d3792f4bebc69f1748b919c1919f1afc1715e21bbf7be2a0f771948dd551861186c3171589a1843f817de7cb9d8bac81b077e8844 +DIST lld-4.0.1.src.tar.xz 593796 SHA256 63ce10e533276ca353941ce5ab5cc8e8dcd99dbdd9c4fa49f344a212f29d36ed SHA512 63bd0813094dc7fa9a95fdee93eb7b97026882a15548f819b5c67f3f0f9fa2a582d968af27ad8f802dbff1f6cd1b8c2fb26b3c7c80379488d05c4a4984d7af68 WHIRLPOOL e7adca75f7f5fbb6136d01544798e969cba69b86c5b76a7fdcf7918564aa13eb868f4fa41102d7a4c501f741664ae309d6842c821ac974503431722ae963f93f DIST llvm-4.0.0.src.tar.xz 21016340 SHA256 8d10511df96e73b8ff9e7abbfb4d4d432edbdbe965f1f4f07afaf370b8a533be SHA512 cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704 WHIRLPOOL 9783e8f47306c1deb2e114d4b46a7db9b0260b4965076345c88765413c5fc8e73fab5f88ae4903adbdea31406022948b16d32ae47d98f5def074509d5d794579 +DIST llvm-4.0.1.src.tar.xz 21065652 SHA256 da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51 SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d WHIRLPOOL 1626ff270f7ce4801d02a0797b227fda9314ff5c0c01d653111599e9a4d2854c4d9edc3c698a7abee8d79d6bce8b18dc619fbced3c07ca610d44a248d65830cc diff --git a/sys-devel/lld/files/4.0.0/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch b/sys-devel/lld/files/4.0.0/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch deleted file mode 100644 index 2a7935f76838..000000000000 --- a/sys-devel/lld/files/4.0.0/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 72b099306f586382a32cb0b37ad6a07dc7cddcf9 Mon Sep 17 00:00:00 2001 -From: Michal Gorny -Date: Wed, 8 Feb 2017 20:08:25 +0000 -Subject: [PATCH 2/3] [test] Use LLD-specific binary&library dirs when building - stand-alone - -Use both LLD- and LLVM-specific binary&library directories when LLD is -being built stand-alone. This ensures that the freshly built tools and -libraries are found and used correctly. - -Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR -to locate lld, and set PATH and LD_LIBRARY_PATH. When doing -a stand-alone builds, these variables represent the installed LLVM. -As a result, tests either fail due to missing lld executables/libraries -or use an earlier installed LLD version rather than the one being built. - -To solve this, an additional LLD_TOOLS_DIR and LLD_LIBS_DIR variables -are added that are populated using LLVM_*_OUTPUT_INTDIR. Those variables -are populated with directories used to output built executables -and libraries. In stand-alone builds, they represent the directories -used by LLD. 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, the resulting PATH is used to locate tools -for substitutions since the search includes both tools built as part of -LLD and of LLVM. - -Differential Revision: https://reviews.llvm.org/D29335 - -git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@294507 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - test/lit.cfg | 14 ++++++++++---- - test/lit.site.cfg.in | 2 ++ - 2 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/test/lit.cfg b/test/lit.cfg -index 0db879312..8dff2fb4e 100644 ---- a/test/lit.cfg -+++ b/test/lit.cfg -@@ -66,18 +66,24 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) - - # Tweak the PATH to include the tools dir and the scripts dir. - if lld_obj_root is not None: -+ lld_tools_dir = getattr(config, 'lld_tools_dir', None) -+ if not lld_tools_dir: -+ lit_config.fatal('No LLD 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((lld_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 - -+ lld_libs_dir = getattr(config, 'lld_libs_dir', None) -+ if not lld_libs_dir: -+ lit_config.fatal('No LLD 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((lld_libs_dir, llvm_libs_dir, - config.environment.get('LD_LIBRARY_PATH',''))) - config.environment['LD_LIBRARY_PATH'] = path - -@@ -174,10 +180,10 @@ for pattern in tool_patterns: - pattern) - tool_pipe = tool_match.group(2) - tool_name = tool_match.group(4) -- tool_path = lit.util.which(tool_name, llvm_tools_dir) -+ tool_path = lit.util.which(tool_name, config.environment['PATH']) - if not tool_path: - # Warn, but still provide a substitution. -- lit_config.note('Did not find ' + tool_name + ' in ' + llvm_tools_dir) -+ lit_config.note('Did not find ' + tool_name + ' in ' + path) - tool_path = llvm_tools_dir + '/' + tool_name - config.substitutions.append((pattern, tool_pipe + tool_path)) - -diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in -index 5293f24c1..9dcb48174 100644 ---- a/test/lit.site.cfg.in -+++ b/test/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.lld_obj_root = "@LLD_BINARY_DIR@" -+config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" -+config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" - config.target_triple = "@TARGET_TRIPLE@" - config.python_executable = "@PYTHON_EXECUTABLE@" - config.have_zlib = "@HAVE_LIBZ@" --- -2.12.0 - diff --git a/sys-devel/lld/files/4.0.0/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch b/sys-devel/lld/files/4.0.0/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch deleted file mode 100644 index b1333ac40bc9..000000000000 --- a/sys-devel/lld/files/4.0.0/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch +++ /dev/null @@ -1,82 +0,0 @@ -From a7fe305520085cff8e4bec0110d323c4f1ccbcab Mon Sep 17 00:00:00 2001 -From: Michal Gorny -Date: Wed, 8 Feb 2017 20:08:29 +0000 -Subject: [PATCH 3/3] [test] Fix zlib cond when building stand-alone, clean up - -Fix the test zlib conditional to use LLVM_ENABLE_ZLIB value when -building stand-alone. The HAVE_LIBZ is not available when performing -a stand-alone build. Since the zlib support is a feature of -the underlying LLVM library, it exports the actual status as the final -value of LLVM_ENABLE_ZLIB in LLVMConfig. - -While at it, canonicalize the boolean value into 0/1 and remove unused -CMake definitions (most likely copied from clang). - -Differential Revision: https://reviews.llvm.org/D29340 - -git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@294508 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - test/CMakeLists.txt | 19 ++++++++++++------- - test/lit.cfg | 2 +- - test/lit.site.cfg.in | 2 +- - 3 files changed, 14 insertions(+), 9 deletions(-) - -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index ede92c13d..962274160 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -3,13 +3,18 @@ set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}") - set(LLVM_BUILD_MODE "%(build_mode)s") - set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") - set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/%(build_config)s") --set(CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") --set(CLANG_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") --if(BUILD_SHARED_LIBS) -- set(ENABLE_SHARED 1) --else() -- set(ENABLE_SHARED 0) --endif(BUILD_SHARED_LIBS) -+ -+if(LLD_BUILT_STANDALONE) -+ # Set HAVE_LIBZ according to recorded LLVM_ENABLE_ZLIB value. This -+ # value is forced to 0 if zlib was not found, so it is fine to use it -+ # instead of HAVE_LIBZ (not recorded). -+ if(LLVM_ENABLE_ZLIB) -+ set(HAVE_LIBZ 1) -+ endif() -+endif() -+ -+llvm_canonicalize_cmake_booleans( -+ HAVE_LIBZ) - - configure_lit_site_cfg( - ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in -diff --git a/test/lit.cfg b/test/lit.cfg -index 8dff2fb4e..85469ff6f 100644 ---- a/test/lit.cfg -+++ b/test/lit.cfg -@@ -202,7 +202,7 @@ if execute_external: - config.available_features.add('shell') - - # zlib compression library --if config.have_zlib == "1": -+if config.have_zlib: - config.available_features.add("zlib") - - # Running on Darwin OS -diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in -index 9dcb48174..1fb8d3690 100644 ---- a/test/lit.site.cfg.in -+++ b/test/lit.site.cfg.in -@@ -10,7 +10,7 @@ config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" - config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" - config.target_triple = "@TARGET_TRIPLE@" - config.python_executable = "@PYTHON_EXECUTABLE@" --config.have_zlib = "@HAVE_LIBZ@" -+config.have_zlib = @HAVE_LIBZ@ - - # Support substitution of the tools and libs dirs with user parameters. This is - # used when we can't determine the tool dir at configuration time. --- -2.12.0 - diff --git a/sys-devel/lld/files/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch b/sys-devel/lld/files/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch new file mode 100644 index 000000000000..2a7935f76838 --- /dev/null +++ b/sys-devel/lld/files/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch @@ -0,0 +1,97 @@ +From 72b099306f586382a32cb0b37ad6a07dc7cddcf9 Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Wed, 8 Feb 2017 20:08:25 +0000 +Subject: [PATCH 2/3] [test] Use LLD-specific binary&library dirs when building + stand-alone + +Use both LLD- and LLVM-specific binary&library directories when LLD is +being built stand-alone. This ensures that the freshly built tools and +libraries are found and used correctly. + +Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR +to locate lld, and set PATH and LD_LIBRARY_PATH. When doing +a stand-alone builds, these variables represent the installed LLVM. +As a result, tests either fail due to missing lld executables/libraries +or use an earlier installed LLD version rather than the one being built. + +To solve this, an additional LLD_TOOLS_DIR and LLD_LIBS_DIR variables +are added that are populated using LLVM_*_OUTPUT_INTDIR. Those variables +are populated with directories used to output built executables +and libraries. In stand-alone builds, they represent the directories +used by LLD. 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, the resulting PATH is used to locate tools +for substitutions since the search includes both tools built as part of +LLD and of LLVM. + +Differential Revision: https://reviews.llvm.org/D29335 + +git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@294507 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + test/lit.cfg | 14 ++++++++++---- + test/lit.site.cfg.in | 2 ++ + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/test/lit.cfg b/test/lit.cfg +index 0db879312..8dff2fb4e 100644 +--- a/test/lit.cfg ++++ b/test/lit.cfg +@@ -66,18 +66,24 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) + + # Tweak the PATH to include the tools dir and the scripts dir. + if lld_obj_root is not None: ++ lld_tools_dir = getattr(config, 'lld_tools_dir', None) ++ if not lld_tools_dir: ++ lit_config.fatal('No LLD 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((lld_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 + ++ lld_libs_dir = getattr(config, 'lld_libs_dir', None) ++ if not lld_libs_dir: ++ lit_config.fatal('No LLD 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((lld_libs_dir, llvm_libs_dir, + config.environment.get('LD_LIBRARY_PATH',''))) + config.environment['LD_LIBRARY_PATH'] = path + +@@ -174,10 +180,10 @@ for pattern in tool_patterns: + pattern) + tool_pipe = tool_match.group(2) + tool_name = tool_match.group(4) +- tool_path = lit.util.which(tool_name, llvm_tools_dir) ++ tool_path = lit.util.which(tool_name, config.environment['PATH']) + if not tool_path: + # Warn, but still provide a substitution. +- lit_config.note('Did not find ' + tool_name + ' in ' + llvm_tools_dir) ++ lit_config.note('Did not find ' + tool_name + ' in ' + path) + tool_path = llvm_tools_dir + '/' + tool_name + config.substitutions.append((pattern, tool_pipe + tool_path)) + +diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in +index 5293f24c1..9dcb48174 100644 +--- a/test/lit.site.cfg.in ++++ b/test/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.lld_obj_root = "@LLD_BINARY_DIR@" ++config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" ++config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" + config.target_triple = "@TARGET_TRIPLE@" + config.python_executable = "@PYTHON_EXECUTABLE@" + config.have_zlib = "@HAVE_LIBZ@" +-- +2.12.0 + diff --git a/sys-devel/lld/files/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch b/sys-devel/lld/files/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch new file mode 100644 index 000000000000..b1333ac40bc9 --- /dev/null +++ b/sys-devel/lld/files/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch @@ -0,0 +1,82 @@ +From a7fe305520085cff8e4bec0110d323c4f1ccbcab Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Wed, 8 Feb 2017 20:08:29 +0000 +Subject: [PATCH 3/3] [test] Fix zlib cond when building stand-alone, clean up + +Fix the test zlib conditional to use LLVM_ENABLE_ZLIB value when +building stand-alone. The HAVE_LIBZ is not available when performing +a stand-alone build. Since the zlib support is a feature of +the underlying LLVM library, it exports the actual status as the final +value of LLVM_ENABLE_ZLIB in LLVMConfig. + +While at it, canonicalize the boolean value into 0/1 and remove unused +CMake definitions (most likely copied from clang). + +Differential Revision: https://reviews.llvm.org/D29340 + +git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@294508 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + test/CMakeLists.txt | 19 ++++++++++++------- + test/lit.cfg | 2 +- + test/lit.site.cfg.in | 2 +- + 3 files changed, 14 insertions(+), 9 deletions(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index ede92c13d..962274160 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -3,13 +3,18 @@ set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}") + set(LLVM_BUILD_MODE "%(build_mode)s") + set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") + set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/%(build_config)s") +-set(CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") +-set(CLANG_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") +-if(BUILD_SHARED_LIBS) +- set(ENABLE_SHARED 1) +-else() +- set(ENABLE_SHARED 0) +-endif(BUILD_SHARED_LIBS) ++ ++if(LLD_BUILT_STANDALONE) ++ # Set HAVE_LIBZ according to recorded LLVM_ENABLE_ZLIB value. This ++ # value is forced to 0 if zlib was not found, so it is fine to use it ++ # instead of HAVE_LIBZ (not recorded). ++ if(LLVM_ENABLE_ZLIB) ++ set(HAVE_LIBZ 1) ++ endif() ++endif() ++ ++llvm_canonicalize_cmake_booleans( ++ HAVE_LIBZ) + + configure_lit_site_cfg( + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in +diff --git a/test/lit.cfg b/test/lit.cfg +index 8dff2fb4e..85469ff6f 100644 +--- a/test/lit.cfg ++++ b/test/lit.cfg +@@ -202,7 +202,7 @@ if execute_external: + config.available_features.add('shell') + + # zlib compression library +-if config.have_zlib == "1": ++if config.have_zlib: + config.available_features.add("zlib") + + # Running on Darwin OS +diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in +index 9dcb48174..1fb8d3690 100644 +--- a/test/lit.site.cfg.in ++++ b/test/lit.site.cfg.in +@@ -10,7 +10,7 @@ config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" + config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" + config.target_triple = "@TARGET_TRIPLE@" + config.python_executable = "@PYTHON_EXECUTABLE@" +-config.have_zlib = "@HAVE_LIBZ@" ++config.have_zlib = @HAVE_LIBZ@ + + # Support substitution of the tools and libs dirs with user parameters. This is + # used when we can't determine the tool dir at configuration time. +-- +2.12.0 + diff --git a/sys-devel/lld/lld-4.0.0.ebuild b/sys-devel/lld/lld-4.0.0.ebuild index cf54f0cc62a2..01ebc3f10f08 100644 --- a/sys-devel/lld/lld-4.0.0.ebuild +++ b/sys-devel/lld/lld-4.0.0.ebuild @@ -49,8 +49,8 @@ src_unpack() { src_prepare() { # backport stand-alone build test fixes from master eapply "${FILESDIR}/4.0.0/0001-cmake-Support-running-tests-in-stand-alone-builds.patch" - eapply "${FILESDIR}/4.0.0/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch" - eapply "${FILESDIR}/4.0.0/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch" + eapply "${FILESDIR}/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch" + eapply "${FILESDIR}/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch" eapply_user } diff --git a/sys-devel/lld/lld-4.0.1.ebuild b/sys-devel/lld/lld-4.0.1.ebuild new file mode 100644 index 000000000000..91cb68a1749a --- /dev/null +++ b/sys-devel/lld/lld-4.0.1.ebuild @@ -0,0 +1,76 @@ +# 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-any-r1 + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="http://llvm.org/" +SRC_URI="http://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz + test? ( http://releases.llvm.org/${PV/_//}/llvm-${PV/_/}.src.tar.xz )" + +LICENSE="UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="test" + +RDEPEND="~sys-devel/llvm-${PV}" +DEPEND="${RDEPEND} + test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )" + +S=${WORKDIR}/${P/_/}.src + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup + use test && python-any-r1_pkg_setup +} + +src_unpack() { + default + + if use test; then + mv llvm-* llvm || die + fi +} + +src_prepare() { + # backport stand-alone build test fixes from master + eapply "${FILESDIR}/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch" + eapply "${FILESDIR}/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch" + + eapply_user +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + + -DLLVM_INCLUDE_TESTS=$(usex test) + # TODO: fix detecting pthread upstream in stand-alone build + -DPTHREAD_LIB='-lpthread' + ) + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLIT_COMMAND="${EPREFIX}/usr/bin/lit" + ) + + cmake-utils_src_configure +} + +src_test() { + cmake-utils_src_make check-lld +} -- cgit v1.2.3-65-gdbad