diff options
author | 2018-03-23 14:44:31 -0700 | |
---|---|---|
committer | 2018-03-23 14:44:31 -0700 | |
commit | bf638baf0e80c20f03a8f64aa264ec06c8591b70 (patch) | |
tree | de1290c2e96d769e160ba99c04ed28fe31b68c6e | |
parent | dev-libs/granite: add vala patch for 0.3.0 (diff) | |
download | arm-bf638baf0e80c20f03a8f64aa264ec06c8591b70.tar.gz arm-bf638baf0e80c20f03a8f64aa264ec06c8591b70.tar.bz2 arm-bf638baf0e80c20f03a8f64aa264ec06c8591b70.zip |
sys-devel/llvm: remove crufty live ebuild
Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
17 files changed, 0 insertions, 1049 deletions
diff --git a/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch b/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch deleted file mode 100644 index 9d99c9c..0000000 --- a/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch +++ /dev/null @@ -1,64 +0,0 @@ -From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001 -From: Tom Stellard <thomas.stellard@amd.com> -Date: Tue, 13 Mar 2012 14:12:21 -0400 -Subject: [PATCH 1/2] r600: Add some intrinsic definitions - ---- - include/llvm/Intrinsics.td | 1 + - include/llvm/IntrinsicsR600.td | 35 +++++++++++++++++++++++++++++++++++ - 2 files changed, 36 insertions(+), 0 deletions(-) - create mode 100644 include/llvm/IntrinsicsR600.td - -diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td -index 069f907..e90dd85 100644 ---- a/include/llvm/Intrinsics.td -+++ b/include/llvm/Intrinsics.td -@@ -441,3 +441,4 @@ include "llvm/IntrinsicsCellSPU.td" - include "llvm/IntrinsicsXCore.td" - include "llvm/IntrinsicsPTX.td" - include "llvm/IntrinsicsHexagon.td" -+include "llvm/IntrinsicsR600.td" -diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td -new file mode 100644 -index 0000000..789fecb ---- /dev/null -+++ b/include/llvm/IntrinsicsR600.td -@@ -0,0 +1,35 @@ -+//===- IntrinsicsR600.td - Defines R600 intrinsics ---------*- tablegen -*-===// -+// -+// The LLVM Compiler Infrastructure -+// -+// This file is distributed under the University of Illinois Open Source -+// License. See LICENSE.TXT for details. -+// -+//===----------------------------------------------------------------------===// -+// -+// This file defines all of the R600-specific intrinsics. -+// -+//===----------------------------------------------------------------------===// -+// -+// Authors: Tom Stellard <thomas.stellard@amd.com> -+// -+ -+let TargetPrefix = "r600" in { -+ -+class R600ReadPreloadRegisterIntrinsic<string name> -+ : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, -+ GCCBuiltin<name>; -+ -+multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> { -+ def _x : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_x")>; -+ def _y : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_y")>; -+ def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>; -+} -+ -+defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_ngroups">; -+defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_tgid">; -+defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_tidig">; -+} // End TargetPrefix = "r600" --- -1.7.7.6 - diff --git a/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch b/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch deleted file mode 100644 index db176dd..0000000 --- a/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 17667fa3450470f7c89fc2ba4631d908cf510749 Mon Sep 17 00:00:00 2001 -From: Tom Stellard <thomas.stellard@amd.com> -Date: Wed, 14 Mar 2012 11:19:35 -0400 -Subject: [PATCH 2/2] r600: Add get_global_size and get_local_size intrinsics - ---- - include/llvm/IntrinsicsR600.td | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td -index 789fecb..0473acb 100644 ---- a/include/llvm/IntrinsicsR600.td -+++ b/include/llvm/IntrinsicsR600.td -@@ -26,6 +26,10 @@ multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> { - def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>; - } - -+defm int_r600_read_global_size : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_global_size">; -+defm int_r600_read_local_size : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_local_size">; - defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < - "__builtin_r600_read_ngroups">; - defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < --- -1.7.7.6 - diff --git a/sys-devel/llvm/files/cl-patches/CVS/Entries b/sys-devel/llvm/files/cl-patches/CVS/Entries deleted file mode 100644 index ef12392..0000000 --- a/sys-devel/llvm/files/cl-patches/CVS/Entries +++ /dev/null @@ -1,3 +0,0 @@ -/0001-r600-Add-some-intrinsic-definitions.patch/1.1/Mon Jul 16 09:31:44 2012// -/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch/1.1/Mon Jul 16 09:31:44 2012// -D diff --git a/sys-devel/llvm/files/cl-patches/CVS/Repository b/sys-devel/llvm/files/cl-patches/CVS/Repository deleted file mode 100644 index 32bc9b7..0000000 --- a/sys-devel/llvm/files/cl-patches/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -gentoo-x86/sys-devel/llvm/files/cl-patches diff --git a/sys-devel/llvm/files/cl-patches/CVS/Root b/sys-devel/llvm/files/cl-patches/CVS/Root deleted file mode 100644 index 8ea6969..0000000 --- a/sys-devel/llvm/files/cl-patches/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -nerdboy@cvs.gentoo.org:/var/cvsroot diff --git a/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch b/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch deleted file mode 100644 index 1f81af0..0000000 --- a/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 916572e1243633ddf913c8f32771a3a7f70fd853 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Fri, 5 Sep 2014 16:49:35 +0200 -Subject: [PATCH] Support obtaining active toolchain from gcc-config. - ---- - tools/clang/lib/Driver/ToolChains.cpp | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/tools/clang/lib/Driver/ToolChains.cpp b/tools/clang/lib/Driver/ToolChains.cpp -index b46f69d..2d4374d 100644 ---- a/tools/clang/lib/Driver/ToolChains.cpp -+++ b/tools/clang/lib/Driver/ToolChains.cpp -@@ -1253,6 +1253,25 @@ Generic_GCC::GCCInstallationDetector::init( - Prefixes.push_back("/usr"); - } - -+ for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) { -+ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File = -+ llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str()); -+ if (File) -+ { -+ const std::string VersionText = File.get()->getBuffer().rsplit('-').second.substr(0,5).str(); -+ const std::string GentooPath = D.SysRoot + "/usr/lib/gcc/" + CandidateTripleAliases[k].str() + "/" + VersionText; -+ if (llvm::sys::fs::exists(GentooPath + "/crtbegin.o")) -+ { -+ Version = GCCVersion::Parse(VersionText); -+ GCCInstallPath = GentooPath; -+ GCCParentLibPath = GCCInstallPath + "/../../.."; -+ GCCTriple.setTriple(CandidateTripleAliases[k]); -+ IsValid = true; -+ return; -+ } -+ } -+ } -+ - // Loop over the various components which exist and select the best GCC - // installation available. GCC installs are ranked by version number. - Version = GCCVersion::Parse("0.0.0"); --- -2.1.0 - diff --git a/sys-devel/llvm/files/clang-9999-gentoo-install.patch b/sys-devel/llvm/files/clang-9999-gentoo-install.patch deleted file mode 100644 index 4e97253..0000000 --- a/sys-devel/llvm/files/clang-9999-gentoo-install.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- tools/clang/lib/Driver/Tools.cpp.orig 2015-07-25 22:17:56.489628405 -0700 -+++ tools/clang/lib/Driver/Tools.cpp 2015-07-25 22:21:43.173439848 -0700 -@@ -1540,7 +1540,7 @@ - // forward. - CmdArgs.push_back("-plugin"); - std::string Plugin = -- ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so"; -+ ToolChain.getDriver().Dir + "/../@libdir@/LLVMgold.so"; - CmdArgs.push_back(Args.MakeArgString(Plugin)); - - // Try to pass driver level flags relevant to LTO code generation down to ---- tools/clang/tools/scan-build/scan-build.orig 2015-07-25 22:21:59.843965110 -0700 -+++ tools/clang/tools/scan-build/scan-build 2015-07-25 22:23:23.193258335 -0700 -@@ -437,7 +437,7 @@ - - my $Dir = shift; - -- my $JS = Cwd::realpath("$RealBin/sorttable.js"); -+ my $JS = Cwd::realpath("@EPREFIX@/usr/share/llvm/sorttable.js"); - - DieDiag("Cannot find 'sorttable.js'.\n") - if (! -r $JS); -@@ -447,7 +447,7 @@ - DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") - if (! -r "$Dir/sorttable.js"); - -- my $CSS = Cwd::realpath("$RealBin/scanview.css"); -+ my $CSS = Cwd::realpath("@EPREFIX@/usr/share/llvm/scanview.css"); - - DieDiag("Cannot find 'scanview.css'.\n") - if (! -r $CSS); ---- tools/clang/tools/scan-view/scan-view.orig 2015-07-25 22:23:50.107439931 -0700 -+++ tools/clang/tools/scan-view/scan-view 2015-07-25 22:24:46.702557184 -0700 -@@ -34,7 +34,7 @@ - import urllib, webbrowser - - url = 'http://%s:%d'%(options.host, port) -- -+ - # Wait for server to start... - if options.debug: - sys.stderr.write('%s: Waiting for server.' % sys.argv[0]) -@@ -54,7 +54,7 @@ - webbrowser.open(url) - - def run(port, options, root): -- import ScanView -+ from clang import ScanView - try: - print 'Starting scan-view at: http://%s:%d'%(options.host, - port) diff --git a/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch b/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch deleted file mode 100644 index 3e57f0d..0000000 --- a/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 2ec240a76253839cd1c5dc2e964f55698ae468fc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Mon, 8 Jun 2015 06:43:00 +0200 -Subject: [PATCH 2/4] cmake: Support overriding Sphinx HTML doc install - directory - -Provide ${PROJECT}_INSTALL_HTML variables (e.g. LLVM_INSTALL_HTML) to -override Sphinx HTML doc install directory. - -Fixes: https://llvm.org/bugs/show_bug.cgi?id=23780 ---- - cmake/modules/AddSphinxTarget.cmake | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake -index 045dc23..9c9c444 100644 ---- a/cmake/modules/AddSphinxTarget.cmake -+++ b/cmake/modules/AddSphinxTarget.cmake -@@ -53,8 +53,12 @@ function (add_sphinx_target builder project) - DESTINATION share/man/man1) - - elseif (builder STREQUAL html) -- install(DIRECTORY "${SPHINX_BUILD_DIR}" -- DESTINATION "share/doc/${project}") -+ string(TOUPPER "${project}" project_upper) -+ set(${project_upper}_INSTALL_HTML "share/doc/${project}/html" -+ CACHE STRING "HTML documentation install directory for ${project}") -+ -+ install(DIRECTORY "${SPHINX_BUILD_DIR}/" -+ DESTINATION "${${project_upper}_INSTALL_HTML}") - else() - message(WARNING Installation of ${builder} not supported) - endif() --- -2.4.3 - diff --git a/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch b/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch deleted file mode 100644 index b1c74c6..0000000 --- a/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4f7092ba05cccfeea7d26177d93f3d7a57d9bce2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Mon, 8 Jun 2015 14:29:03 +0200 -Subject: [PATCH 3/4] cmake: Add an ordering dep between HTML & man Sphinx - targets - -Add a dependency between HTML & manpage Sphinx targets to prevent two -instances of Sphinx from running in parallel, and therefore solves race -conditions reusing the same doctree directory. - -Fixes: https://llvm.org/bugs/show_bug.cgi?id=23781 ---- - docs/CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt -index da27627..63309a6 100644 ---- a/docs/CMakeLists.txt -+++ b/docs/CMakeLists.txt -@@ -100,6 +100,9 @@ if (LLVM_ENABLE_SPHINX) - - if (${SPHINX_OUTPUT_MAN}) - add_sphinx_target(man llvm) -+ if (${SPHINX_OUTPUT_HTML}) -+ add_dependencies(docs-llvm-html docs-llvm-man) -+ endif() - endif() - - endif() --- -2.4.3 - diff --git a/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch b/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch deleted file mode 100644 index 92ca2e4..0000000 --- a/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d9f80393cfd4e586242ac3efd4e6ba6b49ce39ae Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Tue, 9 Jun 2015 11:58:52 +0200 -Subject: [PATCH 4/4] cmake: Do not install libgtest - -libgtest is an internal test dependency, and should not be installed to -the live system as a part of LLVM. ---- - utils/unittest/CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt -index b34e22a..3fe5884 100644 ---- a/utils/unittest/CMakeLists.txt -+++ b/utils/unittest/CMakeLists.txt -@@ -41,6 +41,9 @@ if (PTHREAD_LIBRARY_PATH) - list(APPEND LIBS pthread) - endif() - -+# Delay building until the tests pull it in, and avoid installing it -+set(EXCLUDE_FROM_ALL ON) -+ - add_llvm_library(gtest - googletest/src/gtest-all.cc - --- -2.4.3 - diff --git a/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch deleted file mode 100644 index 904a72a..0000000 --- a/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch +++ /dev/null @@ -1,52 +0,0 @@ -From b28503def986bcbc388a04be0d51cbe80bc59506 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Tue, 9 Jun 2015 12:11:50 +0200 -Subject: [PATCH] Install clang runtime into /usr/lib (without suffix) - ---- - lib/Driver/Driver.cpp | 3 +-- - lib/Frontend/CompilerInvocation.cpp | 3 +-- - lib/Headers/CMakeLists.txt | 2 +- - 3 files changed, 3 insertions(+), 5 deletions(-) - -diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp -index a04a1f8..418d46a 100644 ---- a/tools/clang/lib/Driver/Driver.cpp -+++ b/tools/clang//lib/Driver/Driver.cpp -@@ -66,8 +66,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple, - if (ClangResourceDir != "") { - llvm::sys::path::append(P, ClangResourceDir); - } else { -- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); -- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang", -+ llvm::sys::path::append(P, "..", "lib", "clang", - CLANG_VERSION_STRING); - } - ResourceDir = P.str(); -diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp -index 9485767..0b9ecbd 100644 ---- a/tools/clang/lib/Frontend/CompilerInvocation.cpp -+++ b/tools/clang/lib/Frontend/CompilerInvocation.cpp -@@ -1053,8 +1053,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0, - if (ClangResourceDir != "") { - llvm::sys::path::append(P, ClangResourceDir); - } else { -- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); -- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang", -+ llvm::sys::path::append(P, "..", "lib", "clang", - CLANG_VERSION_STRING); - } - -diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt -index 29a738e..3769d23 100644 ---- a/tools/clang/lib/Headers/CMakeLists.txt -+++ b/tools/clang/lib/Headers/CMakeLists.txt -@@ -93,4 +93,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER "Misc") - install( - FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) -+ DESTINATION lib/clang/${CLANG_VERSION}/include) --- -2.4.3 - diff --git a/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch b/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch deleted file mode 100644 index 0b93deb..0000000 --- a/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d07632abe23d55eec2aae303a142a97765a77d32 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Tue, 9 Jun 2015 12:20:06 +0200 -Subject: [PATCH 2/2] cmake: Make CLANG_LIBDIR_SUFFIX overridable - -Make CLANG_LIBDIR_SUFFIX a cache variable so that it can be explicitly -overriden. It is used purely to find the LLVMgold.so plugin, so we want -to set it to native suffix. ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 357286b..647f976 100644 ---- a/tools/clang/CMakeLists.txt -+++ b/tools/clang/CMakeLists.txt -@@ -203,7 +203,7 @@ set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING - "Vendor-specific uti.") - - # The libdir suffix must exactly match whatever LLVM's configuration used. --set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}") -+set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING "") - - set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) --- -2.4.3 - diff --git a/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch b/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch deleted file mode 100644 index 9353800..0000000 --- a/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8bd62a681744d3c31a0837c0f84f99ea4987e017 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Tue, 9 Jun 2015 12:17:57 +0200 -Subject: [PATCH] cmake: Install compiler-rt into /usr/lib (without suffix) - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0d8a880..5ae98a9 100644 ---- a/projects/compiler-rt/CMakeLists.txt -+++ b/projects/compiler-rt/CMakeLists.txt -@@ -52,7 +52,7 @@ if (NOT COMPILER_RT_STANDALONE_BUILD) - # Setup the paths where compiler-rt runtimes and headers should be stored. - set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}) - set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) -- set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) -+ set(COMPILER_RT_INSTALL_PATH lib/clang/${CLANG_VERSION}) - option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." - ${LLVM_INCLUDE_TESTS}) - option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" --- -2.4.3 - diff --git a/sys-devel/llvm/files/llvm-3.5-gcc-4.9.patch b/sys-devel/llvm/files/llvm-3.5-gcc-4.9.patch deleted file mode 100644 index 7da657f..0000000 --- a/sys-devel/llvm/files/llvm-3.5-gcc-4.9.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 080fb498017d17af2e4d7563608c7d8a848f20da -Author: Sanjoy Das <sanjoy at azulsystems.com> -Date: Thu Jun 19 15:38:02 2014 -0700 - - Fix the --enable-shared build. - - Currently a build configured with ./configure --enable-shared breaks - with an undefined "llvm::cl::parser<llvm::PassInfo - const*>::getOption(unsigned int) const" symbol when linking opt. This - body for this symbol gets emitted into Pass.o (along with the destructor - for PassNameParser), but gets linked into libLLVM-3.5svn.so with local - visibility, causing the link error. - - This fix uses the existing EXTERN_TEMPLATE machinery to force a globally - visible definition for the functions in parser<const PassInfo *> into - Pass.o. - -diff --git a/include/llvm/IR/LegacyPassNameParser.h b/include/llvm/IR/LegacyPassNameParser.h -index e2e4912..a07e3fd 100644 ---- a/include/llvm/IR/LegacyPassNameParser.h -+++ b/include/llvm/IR/LegacyPassNameParser.h -@@ -95,6 +95,8 @@ private: - } - }; - -+EXTERN_TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>); -+ - ///===----------------------------------------------------------------------===// - /// FilteredPassNameParser class - Make use of the pass registration - /// mechanism to automatically add a command line argument to opt for -diff --git a/lib/IR/Pass.cpp b/lib/IR/Pass.cpp -index 91d86ae..00ce223 100644 ---- a/lib/IR/Pass.cpp -+++ b/lib/IR/Pass.cpp -@@ -234,6 +234,8 @@ PassNameParser::~PassNameParser() { - // attempting to remove the registration listener is an error. - } - -+TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>); -+ - //===----------------------------------------------------------------------===// - // AnalysisUsage Class Implementation - // diff --git a/sys-devel/llvm/files/llvm-3.6-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.6-gentoo-install.patch deleted file mode 100644 index c4d0db2..0000000 --- a/sys-devel/llvm/files/llvm-3.6-gentoo-install.patch +++ /dev/null @@ -1,82 +0,0 @@ -From bb016afeba4d9e886e776565a508634a261111a2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 31 Dec 2014 11:26:12 +0100 -Subject: [PATCH] gentoo build fixes - ---- - Makefile.config.in | 6 +++--- - Makefile.rules | 2 +- - tools/llvm-config/BuildVariables.inc.in | 1 + - tools/llvm-config/Makefile | 2 ++ - tools/llvm-config/llvm-config.cpp | 2 +- - 5 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/Makefile.config.in b/Makefile.config.in -index d34a2d5..a26cd08 100644 ---- a/Makefile.config.in -+++ b/Makefile.config.in -@@ -99,10 +99,10 @@ PROJ_internal_prefix := $(prefix) - endif - - PROJ_bindir := $(PROJ_prefix)/bin --PROJ_libdir := $(PROJ_prefix)/lib -+PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR) - PROJ_datadir := $(PROJ_prefix)/share --PROJ_docsdir := $(PROJ_prefix)/docs/llvm --PROJ_etcdir := $(PROJ_prefix)/etc/llvm -+PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@ -+PROJ_etcdir := @EPREFIX@/etc/llvm - PROJ_includedir := $(PROJ_prefix)/include - PROJ_infodir := $(PROJ_prefix)/info - PROJ_mandir := $(PROJ_prefix)/share/man -diff --git a/Makefile.rules b/Makefile.rules -index c8c971f..d1258b1 100644 ---- a/Makefile.rules -+++ b/Makefile.rules -@@ -283,7 +283,7 @@ ifeq ($(ENABLE_OPTIMIZED),1) - BuildMode := Release - # Don't use -fomit-frame-pointer on Darwin or FreeBSD. - ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin DragonFly FreeBSD GNU/kFreeBSD)) -- OmitFramePointer := -fomit-frame-pointer -+ OmitFramePointer := - endif - - CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) -diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in -index 3f51f49..513ea89 100644 ---- a/tools/llvm-config/BuildVariables.inc.in -+++ b/tools/llvm-config/BuildVariables.inc.in -@@ -26,3 +26,4 @@ - #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" - #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" - #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" -+#define LLVM_LIBDIR "@LLVM_LIBDIR@" -diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile -index 1ff8b6f..5d73c6e 100644 ---- a/tools/llvm-config/Makefile -+++ b/tools/llvm-config/Makefile -@@ -65,6 +65,8 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \ - >> temp.sed -+ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \ -+ >> temp.sed - $(Verb) $(SED) -f temp.sed < $< > $@ - $(Verb) $(RM) temp.sed - -diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp -index 224035a..57180ac 100644 ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp -@@ -265,7 +265,7 @@ int main(int argc, char **argv) { - ActivePrefix = CurrentExecPrefix; - ActiveIncludeDir = ActivePrefix + "/include"; - ActiveBinDir = ActivePrefix + "/bin"; -- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; -+ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR; - ActiveIncludeOption = "-I" + ActiveIncludeDir; - } - --- -2.2.1 - diff --git a/sys-devel/llvm/files/llvm-9999-nodoctargz.patch b/sys-devel/llvm/files/llvm-9999-nodoctargz.patch deleted file mode 100644 index 033d393..0000000 --- a/sys-devel/llvm/files/llvm-9999-nodoctargz.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- docs/Makefile.orig 2015-07-25 21:59:05.630615076 -0700 -+++ docs/Makefile 2015-07-25 22:01:57.729405144 -0700 -@@ -62,11 +62,10 @@ - # 'make generated BUILD_FOR_WEBSITE=1' - generated:: $(generated_targets) - --install-html: $(PROJ_OBJ_DIR)/html.tar.gz -+install-html: - $(Echo) Installing HTML documentation - $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html - $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html -- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) - - $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) - $(Echo) Packaging HTML documentation -@@ -77,7 +76,6 @@ - - install-doxygen: doxygen - $(Echo) Installing doxygen documentation -- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) - $(Verb) cd $(PROJ_OBJ_DIR)/doxygen/html && \ - for DIR in $$($(FIND) . -type d); do \ - DESTSUB="$(DESTDIR)$(PROJ_docsdir)/html/doxygen/$$(echo $$DIR | cut -c 3-)"; \ -@@ -86,7 +84,7 @@ - if [ $$? != 0 ]; then exit 1; fi \ - done - --doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz -+doxygen: regendoc - - regendoc: - $(Echo) Building doxygen documentation -@@ -110,7 +108,6 @@ - install-ocamldoc: ocamldoc - $(Echo) Installing ocamldoc documentation - $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html -- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) - $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ - $(FIND) . -type f -exec \ - $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; -@@ -120,7 +117,6 @@ - $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar* - $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc - $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar -- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/ - - regen-ocamldoc: - $(Echo) Building ocamldoc documentation diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild deleted file mode 100644 index 7fa7486..0000000 --- a/sys-devel/llvm/llvm-9999.ebuild +++ /dev/null @@ -1,486 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.119 2015/07/19 17:29:33 mgorny Exp $ - -EAPI=5 - -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -PYTHON_COMPAT=( python2_7 pypy ) - -inherit check-reqs cmake-utils eutils flag-o-matic git-r3 multilib \ - multilib-minimal python-r1 toolchain-funcs pax-utils - -DESCRIPTION="Low Level Virtual Machine" -HOMEPAGE="http://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="http://llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" - -LICENSE="UoI-NCSA" -SLOT="0/${PV}" -KEYWORDS="" -IUSE="clang debug +doc gold libedit +libffi lldb multitarget ncurses ocaml - python +static-analyzer test xml video_cards_radeon kernel_Darwin" - -COMMON_DEPEND=" - sys-libs/zlib:0= - clang? ( - python? ( ${PYTHON_DEPS} ) - static-analyzer? ( - dev-lang/perl:* - ${PYTHON_DEPS} - ) - xml? ( dev-libs/libxml2:2= ) - ) - gold? ( >=sys-devel/binutils-2.22:*[cxx] ) - libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) - libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.9-r3:5=[${MULTILIB_USEDEP}] ) - ocaml? ( - dev-lang/ocaml:0= - dev-ml/findlib - dev-ml/ocaml-ctypes )" -# configparser-3.2 breaks the build (3.3 or none at all are fine) -DEPEND="${COMMON_DEPEND} - dev-lang/perl - >=sys-devel/make-3.81 - >=sys-devel/flex-2.5.4 - >=sys-devel/bison-1.875d - || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 - ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) - ) - || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) - kernel_Darwin? ( sys-libs/libcxx ) - clang? ( xml? ( virtual/pkgconfig ) ) - doc? ( dev-python/sphinx ) - libffi? ( virtual/pkgconfig ) - lldb? ( dev-lang/swig ) - !!<dev-python/configparser-3.3.0.2 - ${PYTHON_DEPS}" -RDEPEND="${COMMON_DEPEND} - clang? ( !<=sys-devel/clang-${PV}-r99 ) - abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" -PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" - -# pypy gives me around 1700 unresolved tests due to open file limit -# being exceeded. probably GC does not close them fast enough. -REQUIRED_USE="${PYTHON_REQUIRED_USE} - lldb? ( clang ) - test? ( || ( $(python_gen_useflags 'python*') ) )" - -pkg_pretend() { - # in megs - # !clang !debug !multitarget -O2 400 - # !clang !debug multitarget -O2 550 - # clang !debug !multitarget -O2 950 - # clang !debug multitarget -O2 1200 - # !clang debug multitarget -O2 5G - # clang !debug multitarget -O0 -g 12G - # clang debug multitarget -O2 16G - # clang debug multitarget -O0 -g 14G - - local build_size=550 - use clang && build_size=1200 - - if use debug; then - ewarn "USE=debug is known to increase the size of package considerably" - ewarn "and cause the tests to fail." - ewarn - - (( build_size *= 14 )) - elif is-flagq '-g?(gdb)?([1-9])'; then - ewarn "The C++ compiler -g option is known to increase the size of the package" - ewarn "considerably. If you run out of space, please consider removing it." - ewarn - - (( build_size *= 10 )) - fi - - # Multiply by number of ABIs :). - local abis=( $(multilib_get_enabled_abis) ) - (( build_size *= ${#abis[@]} )) - - local CHECKREQS_DISK_BUILD=${build_size}M - check-reqs_pkg_pretend - - if [[ ${MERGE_TYPE} != binary ]]; then - echo 'int main() {return 0;}' > "${T}"/test.cxx || die - ebegin "Trying to build a C++11 test program" - if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then - eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" - eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" - eerror "to gcc-4.7 or an equivalent version supporting C++11." - die "Currently active compiler does not support -std=c++11" - fi - eend ${?} - fi -} - -pkg_setup() { - pkg_pretend -} - -src_unpack() { - if use clang; then - git-r3_fetch "http://llvm.org/git/compiler-rt.git - https://github.com/llvm-mirror/compiler-rt.git" - git-r3_fetch "http://llvm.org/git/clang.git - https://github.com/llvm-mirror/clang.git" - git-r3_fetch "http://llvm.org/git/clang-tools-extra.git - https://github.com/llvm-mirror/clang-tools-extra.git" - fi - if use lldb; then - git-r3_fetch "http://llvm.org/git/lldb.git - https://github.com/llvm-mirror/lldb.git" - fi - git-r3_fetch - - if use clang; then - git-r3_checkout http://llvm.org/git/compiler-rt.git \ - "${S}"/projects/compiler-rt - git-r3_checkout http://llvm.org/git/clang.git \ - "${S}"/tools/clang - git-r3_checkout http://llvm.org/git/clang-tools-extra.git \ - "${S}"/tools/clang/tools/extra - fi - if use lldb; then - git-r3_checkout http://llvm.org/git/lldb.git \ - "${S}"/tools/lldb - fi - git-r3_checkout -} - -src_prepare() { - # Make ocaml warnings non-fatal, bug #537308 - sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die - - # Make it possible to override Sphinx HTML install dirs - # https://llvm.org/bugs/show_bug.cgi?id=23780 - epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch - - # Prevent race conditions with parallel Sphinx runs - # https://llvm.org/bugs/show_bug.cgi?id=23781 - epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch - - # Prevent installing libgtest - # https://llvm.org/bugs/show_bug.cgi?id=18341 - epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch - - if use clang; then - # Automatically select active system GCC's libraries, bugs #406163 and #417913 - epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch - - epatch "${FILESDIR}"/clang-9999-gentoo-install.patch - - sed -i -e "s^@EPREFIX@^${EPREFIX}^" \ - tools/clang/tools/scan-build/scan-build || die - - # Install clang runtime into /usr/lib/clang - # https://llvm.org/bugs/show_bug.cgi?id=23792 - epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch - epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch - - # Make it possible to override CLANG_LIBDIR_SUFFIX - # (that is used only to find LLVMgold.so) - # https://llvm.org/bugs/show_bug.cgi?id=23793 - epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch - fi - - if use lldb; then - # Do not install dummy readline.so module from - # https://llvm.org/bugs/show_bug.cgi?id=18841 - sed -e 's/add_subdirectory(readline)/#&/' \ - -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die - fi - - # User patches - epatch_user - - python_setup - - # Native libdir is used to hold LLVMgold.so - NATIVE_LIBDIR=$(get_libdir) -} - -multilib_src_configure() { - local targets - if use multitarget; then - targets=all - else - targets='host;CppBackend' - use video_cards_radeon && targets+=';AMDGPU' - fi - - local ffi_cflags ffi_ldflags - if use libffi; then - ffi_cflags=$(pkg-config --cflags-only-I libffi) - ffi_ldflags=$(pkg-config --libs-only-L libffi) - fi - - local libdir=$(get_libdir) - local mycmakeargs=( - "${mycmakeargs[@]}" - -DLLVM_LIBDIR_SUFFIX=${libdir#lib} - - -DBUILD_SHARED_LIBS=ON - -DLLVM_ENABLE_TIMESTAMPS=OFF - -DLLVM_TARGETS_TO_BUILD="${targets}" - -DLLVM_BUILD_TESTS=$(usex test) - - -DLLVM_ENABLE_FFI=$(usex libffi) - -DLLVM_ENABLE_TERMINFO=$(usex ncurses) - -DLLVM_ENABLE_ASSERTIONS=$(usex debug) - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_RTTI=ON - - -DWITH_POLLY=OFF # TODO - - -DLLVM_HOST_TRIPLE="${CHOST}" - - -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" - -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" - - -DHAVE_HISTEDIT_H=$(usex libedit) - ) - - if use lldb; then - mycmakeargs+=( - -DLLDB_DISABLE_LIBEDIT=$(usex !libedit) - -DLLDB_DISABLE_CURSES=$(usex !ncurses) - -DLLDB_ENABLE_TERMINFO=$(usex ncurses) - ) - fi - - if ! multilib_is_native_abi || ! use ocaml; then - mycmakeargs+=( - -DOCAMLFIND=NO - ) - fi -# Note: go bindings have no CMake rules at the moment -# but let's kill the check in case they are introduced -# if ! multilib_is_native_abi || ! use go; then - mycmakeargs+=( - -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND - ) -# fi - - if multilib_is_native_abi; then - mycmakeargs+=( - -DLLVM_BUILD_DOCS=$(usex doc) - -DLLVM_ENABLE_SPHINX=$(usex doc) - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html" - ) - - if use clang; then - mycmakeargs+=( - -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang" - ) - fi - - if use gold; then - mycmakeargs+=( - -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include - ) - fi - - if use lldb; then - mycmakeargs+=( - -DLLDB_DISABLE_PYTHON=$(usex !python) - ) - fi - - else - if use clang; then - mycmakeargs+=( - # disable compiler-rt on non-native ABI because: - # 1. it fails to configure because of -m32 - # 2. it is shared between ABIs so no point building - # it multiple times - -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF - -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF - ) - fi - if use lldb; then - mycmakeargs+=( - # only run swig on native abi - -DLLDB_DISABLE_PYTHON=ON - ) - fi - fi - - if use clang; then - mycmakeargs+=( - -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) - -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) - -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}" - ) - - # -- not needed when compiler-rt is built with host compiler -- - # cmake passes host C*FLAGS to compiler-rt build - # which is performed using clang, so we need to filter out - # some flags clang does not support - # (if you know some more flags that don't work, let us know) - #filter-flags -msahf -frecord-gcc-switches - fi - - cmake-utils_src_configure -} - -multilib_src_compile() { - cmake-utils_src_compile - - pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld - pax-mark m "${BUILD_DIR}"/bin/lli - pax-mark m "${BUILD_DIR}"/bin/lli-child-target - - if use test; then - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests - pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - local test_targets=( check ) - # clang tests won't work on non-native ABI because we skip compiler-rt - multilib_is_native_abi && use clang && test_targets+=( check-clang ) - cmake-utils_src_make "${test_targets[@]}" -} - -src_install() { - local MULTILIB_CHOST_TOOLS=( - /usr/bin/llvm-config - ) - - local MULTILIB_WRAPPED_HEADERS=( - /usr/include/llvm/Config/config.h - /usr/include/llvm/Config/llvm-config.h - ) - - if use clang; then - # note: magic applied in multilib_src_install()! - CLANG_VERSION=3.8 - - MULTILIB_CHOST_TOOLS+=( - /usr/bin/clang - /usr/bin/clang++ - /usr/bin/clang-cl - /usr/bin/clang-${CLANG_VERSION} - /usr/bin/clang++-${CLANG_VERSION} - /usr/bin/clang-cl-${CLANG_VERSION} - ) - - MULTILIB_WRAPPED_HEADERS+=( - /usr/include/clang/Config/config.h - ) - fi - - multilib-minimal_src_install -} - -multilib_src_install() { - cmake-utils_src_install - - if multilib_is_native_abi; then - # Install docs. - #use doc && dohtml -r "${S}"/docs/_build/html/ - - # Symlink the gold plugin. - if use gold; then - dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" - dosym "../../../../$(get_libdir)/LLVMgold.so" \ - "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" - fi - fi - - # apply CHOST and CLANG_VERSION to clang executables - # they're statically linked so we don't have to worry about the lib - if use clang; then - local clang_tools=( clang clang++ clang-cl ) - local i - - # cmake gives us: - # - clang-X.Y - # - clang -> clang-X.Y - # - clang++, clang-cl -> clang - # we want to have: - # - clang-X.Y - # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y - # - clang, clang++, clang-cl -> clang*-X.Y - # so we need to fix the two tools - for i in "${clang_tools[@]:1}"; do - rm "${ED%/}/usr/bin/${i}" || die - dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}" - dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}" - done - - # now prepend ${CHOST} and let the multilib-build.eclass symlink it - if ! multilib_is_native_abi; then - # non-native? let's replace it with a simple wrapper - for i in "${clang_tools[@]}"; do - rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die - cat > "${T}"/wrapper.tmp <<-_EOF_ - #!${EPREFIX}/bin/sh - exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}" - _EOF_ - newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}" - done - fi - fi -} - -multilib_src_install_all() { - insinto /usr/share/vim/vimfiles - doins -r utils/vim/*/ - # some users may find it useful - dodoc utils/vim/vimrc - - if use clang; then - pushd tools/clang >/dev/null || die - - if use static-analyzer ; then - pushd tools/scan-build >/dev/null || die - - dobin ccc-analyzer scan-build - dosym ccc-analyzer /usr/bin/c++-analyzer - doman scan-build.1 - - insinto /usr/share/llvm - doins scanview.css sorttable.js - - popd >/dev/null || die - fi - - python_inst() { - if use static-analyzer ; then - pushd tools/scan-view >/dev/null || die - - python_doscript scan-view - - touch __init__.py || die - python_moduleinto clang - python_domodule *.py Resources - - popd >/dev/null || die - fi - - if use python ; then - pushd bindings/python/clang >/dev/null || die - - python_moduleinto clang - python_domodule *.py - - popd >/dev/null || die - fi - - # AddressSanitizer symbolizer (currently separate) - python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py - } - python_foreach_impl python_inst - popd >/dev/null || die - fi -} |