* [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/
@ 2016-08-22 15:12 Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2016-08-22 15:12 UTC (permalink / raw
To: gentoo-commits
commit: 4ab9c2e321dbe726cbf8083adc157d1bc63e36de
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 20 21:38:24 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Aug 22 15:11:49 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ab9c2e3
sys-devel/clang: Enable stand-alone builds against sys-devel/llvm
sys-devel/clang/clang-9999-r100.ebuild | 36 ---
sys-devel/clang/clang-9999.ebuild | 265 +++++++++++++++++++++
...rdering-dep-between-HTML-Sphinx-docs-and-.patch | 27 +++
...ort-obtaining-active-toolchain-from-gcc-c.patch | 46 ++++
...ort-checking-for-rlimits-via-cmake-when-b.patch | 84 +++++++
...t-llvm-lit-search-to-match-the-one-in-LLV.patch | 29 +++
...rting-overriding-runtime-libdir-via-CLANG.patch | 86 +++++++
...LANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch | 64 +++++
...port-stand-alone-Sphinx-doxygen-doc-build.patch | 64 +++++
sys-devel/clang/metadata.xml | 2 +
10 files changed, 667 insertions(+), 36 deletions(-)
diff --git a/sys-devel/clang/clang-9999-r100.ebuild b/sys-devel/clang/clang-9999-r100.ebuild
deleted file mode 100644
index eb10ee5..0000000
--- a/sys-devel/clang/clang-9999-r100.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit multilib-build
-
-DESCRIPTION="C language family frontend for LLVM (meta-ebuild)"
-HOMEPAGE="http://clang.llvm.org/"
-SRC_URI=""
-
-LICENSE="UoI-NCSA"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="debug multitarget python +static-analyzer"
-
-RDEPEND="~sys-devel/llvm-${PV}[clang(-),debug=,multitarget?,python?,static-analyzer?,${MULTILIB_USEDEP}]"
-
-# Please keep this package around since it's quite likely that we'll
-# return to separate LLVM & clang ebuilds when the cmake build system
-# is complete.
-
-pkg_postinst() {
- if has_version ">=dev-util/ccache-3.1.9-r2" ; then
- #add ccache links as clang might get installed after ccache
- "${EROOT}"/usr/bin/ccache-config --install-links
- fi
-}
-
-pkg_postrm() {
- if has_version ">=dev-util/ccache-3.1.9-r2" && [[ -z ${REPLACED_BY_VERSION} ]]; then
- # --remove-links would remove all links, --install-links updates them
- "${EROOT}"/usr/bin/ccache-config --install-links
- fi
-}
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
new file mode 100644
index 0000000..ad0fcf3
--- /dev/null
+++ b/sys-devel/clang/clang-9999.ebuild
@@ -0,0 +1,265 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+CMAKE_MIN_VERSION=3.4.3
+PYTHON_COMPAT=( python2_7 )
+
+inherit check-reqs cmake-utils flag-o-matic git-r3 multilib-minimal \
+ python-single-r1 toolchain-funcs pax-utils
+
+DESCRIPTION="C language family frontend for LLVM"
+HOMEPAGE="http://llvm.org/"
+SRC_URI=""
+EGIT_REPO_URI="http://llvm.org/git/clang.git
+ https://github.com/llvm-mirror/clang.git"
+
+LICENSE="UoI-NCSA"
+SLOT="0/${PV%.*}"
+KEYWORDS=""
+IUSE="debug default-compiler-rt default-libcxx +doc multitarget python
+ +static-analyzer test xml video_cards_radeon elibc_musl kernel_FreeBSD"
+
+RDEPEND="
+ ~sys-devel/llvm-${PV}:=[debug=,multitarget?,video_cards_radeon?,${MULTILIB_USEDEP}]
+ static-analyzer? ( dev-lang/perl:* )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ !<sys-devel/llvm-${PV}
+ ${PYTHON_DEPS}"
+# configparser-3.2 breaks the build (3.3 or none at all are fine)
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx )
+ xml? ( virtual/pkgconfig )
+ !!<dev-python/configparser-3.3.0.2
+ ${PYTHON_DEPS}"
+PDEPEND="
+ default-compiler-rt? ( sys-libs/compiler-rt )
+ default-libcxx? ( sys-libs/libcxx )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+pkg_pretend() {
+ local build_size=650
+
+ 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
+}
+
+pkg_setup() {
+ pkg_pretend
+
+ python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ git-r3_fetch "http://llvm.org/git/clang-tools-extra.git
+ https://github.com/llvm-mirror/clang-tools-extra.git"
+ git-r3_fetch
+
+ git-r3_checkout http://llvm.org/git/clang-tools-extra.git \
+ "${S}"/tools/clang/tools/extra
+ git-r3_checkout
+}
+
+src_prepare() {
+ python_setup
+
+ # fix race condition between sphinx targets
+ eapply "${FILESDIR}"/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch
+ # automatically select active system GCC's libraries, bugs #406163 and #417913
+ # TODO: cross-linux tests broken by this one
+ eapply "${FILESDIR}"/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
+ # use cmake checks for rlimits, rather than __has_include_next()
+ eapply "${FILESDIR}"/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
+ # adjust llvm-lit search to match LLVM cmake macros
+ eapply "${FILESDIR}"/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
+ # support overriding clang runtime install directory
+ eapply "${FILESDIR}"/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
+ # support overriding LLVMgold.so plugin directory
+ eapply "${FILESDIR}"/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
+ # fix stand-alone doc build
+ eapply "${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
+
+ # User patches
+ eapply_user
+
+ # 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;BPF'
+ use video_cards_radeon && targets+=';AMDGPU'
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ # install clang runtime straight into /usr/lib
+ -DCLANG_LIBDIR_SUFFIX=""
+ # specify host's binutils gold plugin path
+ -DCLANG_GOLD_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
+
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_TARGETS_TO_BUILD="${targets}"
+ # TODO: get them properly conditional
+ #-DLLVM_BUILD_TESTS=$(usex test)
+
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
+ # libgomp support fails to find headers without explicit -I
+ # furthermore, it provides only syntax checking
+ -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
+
+ # override default stdlib and rtlib
+ -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
+ -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
+
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ )
+
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ # TODO: docs don't work out-of-llvm
+ -DLLVM_BUILD_DOCS=$(usex doc)
+ -DLLVM_ENABLE_SPHINX=$(usex doc)
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ else
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF
+ )
+ fi
+
+ if tc-is-cross-compiler; then
+ [[ -x "/usr/bin/clang-tblgen" ]] \
+ || die "/usr/bin/clang-tblgen not found or usable"
+ mycmakeargs+=(
+ -DCMAKE_CROSSCOMPILING=ON
+ -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake-utils_src_make check-clang
+}
+
+src_install() {
+ # note: magic applied in multilib_src_install()!
+ CLANG_VERSION=4.0
+
+ 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
+ )
+
+ multilib-minimal_src_install
+
+ # Remove unnecessary headers on FreeBSD, bug #417171
+ if use kernel_FreeBSD && use clang; then
+ rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h || die
+ fi
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ # apply CHOST and CLANG_VERSION to clang executables
+ # they're statically linked so we don't have to worry about the lib
+ 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
+}
+
+multilib_src_install_all() {
+ if use python ; then
+ pushd bindings/python/clang >/dev/null || die
+
+ python_moduleinto clang
+ python_domodule *.py
+
+ popd >/dev/null || die
+ fi
+
+ python_fix_shebang "${ED}"
+ if use static-analyzer; then
+ python_optimize "${ED}"usr/share/scan-view
+ fi
+}
+
+pkg_postinst() {
+ if ! has_version 'sys-libs/libomp'; then
+ elog "To enable OpenMP support in clang, install sys-libs/libomp."
+ fi
+}
diff --git a/sys-devel/clang/files/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch b/sys-devel/clang/files/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch
new file mode 100644
index 0000000..35fc19d
--- /dev/null
+++ b/sys-devel/clang/files/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch
@@ -0,0 +1,27 @@
+From ec16b3f76a26a3a10b0272d012b306963fa93013 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:24:19 +0200
+Subject: [PATCH 1/7] cmake: Add ordering dep between HTML Sphinx docs and
+ manpages
+
+---
+ docs/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
+index 13b79fdf..bd75b63 100644
+--- a/docs/CMakeLists.txt
++++ b/docs/CMakeLists.txt
+@@ -102,6 +102,9 @@ if (LLVM_ENABLE_SPHINX)
+ endif()
+ if (${SPHINX_OUTPUT_MAN})
+ add_sphinx_target(man clang)
++ if (${SPHINX_OUTPUT_HTML})
++ add_dependencies(docs-clang-html docs-clang-man)
++ endif()
+ endif()
+ endif()
+ endif()
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch b/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
new file mode 100644
index 0000000..6128cb9
--- /dev/null
+++ b/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
@@ -0,0 +1,46 @@
+From 67025453e6c2373c8d761f6435e7fa4ddaacd8fa 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 2/7] driver: Support obtaining active toolchain from
+ gcc-config on Gentoo
+
+Author: Richard Yao <ryao@gentoo.org>
+Bug: https://bugs.gentoo.org/406163
+Bug: https://bugs.gentoo.org/417913
+---
+ lib/Driver/ToolChains.cpp | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
+index 68d5214..7689f86 100644
+--- a/lib/Driver/ToolChains.cpp
++++ b/lib/Driver/ToolChains.cpp
+@@ -1418,6 +1418,25 @@ void Generic_GCC::GCCInstallationDetector::init(
+ }
+ }
+
++ 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.9.3
+
diff --git a/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch b/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
new file mode 100644
index 0000000..16d63ec
--- /dev/null
+++ b/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
@@ -0,0 +1,84 @@
+From 27b65490c9764d18fa02274bbb4f75dd5a688506 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:30:17 +0200
+Subject: [PATCH 3/7] driver: Support checking for rlimits via cmake (when
+ bootstrapping)
+
+Add a cmake check for sys/resource.h and replace the __has_include()
+check with its result, in order to make it possible to use rlimits when
+building with compilers not supporting __has_include() -- i.e. when
+bootstrapping.
+
+Patch: https://reviews.llvm.org/D23744
+---
+ CMakeLists.txt | 3 +++
+ include/clang/Config/config.h.cmake | 3 +++
+ tools/driver/cc1_main.cpp | 8 +++-----
+ 3 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e6dde85..aee0d0a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -177,6 +177,9 @@ if (LIBXML2_FOUND)
+ set(CLANG_HAVE_LIBXML 1)
+ endif()
+
++include(CheckIncludeFile)
++check_include_file(sys/resource.h CLANG_HAVE_RLIMITS)
++
+ set(CLANG_RESOURCE_DIR "" CACHE STRING
+ "Relative directory from the Clang binary to its resource files.")
+
+diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
+index 9200ed9..9bf9ea5 100644
+--- a/include/clang/Config/config.h.cmake
++++ b/include/clang/Config/config.h.cmake
+@@ -35,6 +35,9 @@
+ /* Define if we have libxml2 */
+ #cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML}
+
++/* Define if we have sys/resource.h (rlimits) */
++#cmakedefine CLANG_HAVE_RLIMITS ${CLANG_HAVE_RLIMITS}
++
+ /* The LLVM product name and version */
+ #define BACKEND_PACKAGE_STRING "${BACKEND_PACKAGE_STRING}"
+
+diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
+index b8cea41..45d44a0 100644
+--- a/tools/driver/cc1_main.cpp
++++ b/tools/driver/cc1_main.cpp
+@@ -15,6 +15,7 @@
+
+ #include "llvm/Option/Arg.h"
+ #include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
++#include "clang/Config/config.h"
+ #include "clang/Driver/DriverDiagnostic.h"
+ #include "clang/Driver/Options.h"
+ #include "clang/Frontend/CompilerInstance.h"
+@@ -37,12 +38,9 @@
+ #include "llvm/Support/raw_ostream.h"
+ #include <cstdio>
+
+-#ifdef __has_include
+-#if __has_include(<sys/resource.h>)
+-#define HAVE_RLIMITS
++#ifdef CLANG_HAVE_RLIMITS
+ #include <sys/resource.h>
+ #endif
+-#endif
+
+ using namespace clang;
+ using namespace llvm::opt;
+@@ -73,7 +71,7 @@ void initializePollyPasses(llvm::PassRegistry &Registry);
+ }
+ #endif
+
+-#ifdef HAVE_RLIMITS
++#ifdef CLANG_HAVE_RLIMITS
+ // The amount of stack we think is "sufficient". If less than this much is
+ // available, we may be unable to reach our template instantiation depth
+ // limit and other similar limits.
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch b/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
new file mode 100644
index 0000000..bcf409c
--- /dev/null
+++ b/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
@@ -0,0 +1,29 @@
+From d7bc0e05e8064e0c939db6c2fb6d215fd0340708 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:30:39 +0200
+Subject: [PATCH 4/7] cmake: Adjust llvm-lit search to match the one in LLVM
+
+Adjust the system lit executable search to look for llvm-lit as that is
+the name used in AddLLVM.cmake installed by LLVM.
+
+Patch: https://reviews.llvm.org/D23745
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index aee0d0a..e95ab52 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -140,7 +140,7 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
+ endif()
+ else()
+ # Seek installed Lit.
+- find_program(LLVM_LIT "lit.py" ${LLVM_MAIN_SRC_DIR}/utils/lit
++ find_program(LLVM_LIT "llvm-lit" ${LLVM_MAIN_SRC_DIR}/utils/lit
+ DOC "Path to lit.py")
+ endif()
+
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch b/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
new file mode 100644
index 0000000..da737c1
--- /dev/null
+++ b/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
@@ -0,0 +1,86 @@
+From 8864d8f9da1b30c9539e9dc0388c5d0dccca3a34 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:31:06 +0200
+Subject: [PATCH 5/7] cmake: Supporting overriding runtime libdir via
+ CLANG_LIBDIR_SUFFIX
+
+Make it possible to override the value of CLANG_LIBDIR_SUFFIX, and use
+it uniformly to control install location of runtimes (i.e. lib/clang),
+therefore supporting sharing a common runtime between multiple multilib
+variants.
+
+Previously, CLANG_LIBDIR_SUFFIX was pinned to LLVM_LIBDIR_SUFFIX
+and used only to define runtime path in driver code. This patch extends
+its use to building and installing the runtime (the former is needed for
+tests to work correctly).
+
+The goal is to support install layout alike "LLVM_LIBDIR_SUFFIX=64
+CLANG_LIBDIR_SUFFIX=''" -- where all shared libraries would be installed
+into ABI-specific /usr/lib64, while runtime (that is common between
+multilib ABIs) would be installed into /usr/lib.
+
+Bug: https://llvm.org/bugs/show_bug.cgi?id=23792
+Patch: https://reviews.llvm.org/D23752
+---
+ CMakeLists.txt | 5 +++--
+ lib/Headers/CMakeLists.txt | 4 ++--
+ runtime/CMakeLists.txt | 4 ++--
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e95ab52..67b85b5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -235,8 +235,9 @@ endif()
+ 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 "Define suffix of library directory name for clang runtime (32/64)")
++set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${CLANG_LIBDIR_SUFFIX})
+
+ set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index 600fece..86a70c5 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -88,7 +88,7 @@ set(files
+ xtestintrin.h
+ )
+
+-set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
++set(output_dir ${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
+
+ # Generate arm_neon.h
+ clang_tablegen(arm_neon.h -gen-arm-neon
+@@ -118,7 +118,7 @@ install(
+ FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
+ COMPONENT clang-headers
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++ DESTINATION lib${CLANG_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+
+ if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
+ add_custom_target(install-clang-headers
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index 814857f..9348615 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -71,9 +71,9 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
+ -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
+ -DLLVM_CONFIG_PATH=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-config
+ -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS}
+- -DCOMPILER_RT_OUTPUT_DIR=${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}
++ -DCOMPILER_RT_OUTPUT_DIR=${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}
+ -DCOMPILER_RT_EXEC_OUTPUT_DIR=${LLVM_RUNTIME_OUTPUT_INTDIR}
+- -DCOMPILER_RT_INSTALL_PATH:STRING=lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}
++ -DCOMPILER_RT_INSTALL_PATH:STRING=lib${CLANG_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}
+ -DCOMPILER_RT_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
+ -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
+ -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX}
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch b/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
new file mode 100644
index 0000000..18adcca
--- /dev/null
+++ b/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
@@ -0,0 +1,64 @@
+From cf60af04f0ac2836f50d5a042acc89ef76e76a66 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:31:28 +0200
+Subject: [PATCH 6/7] cmake: Add CLANG_GOLD_LIBDIR_SUFFIX to specify loc of
+ LLVMgold.so
+
+Add CLANG_GOLD_LIBDIR_SUFFIX that defaults to ${LLVM_LIBDIR_SUFFIX}
+and can be overriden if LLVMgold.so is installed elsewhere. The use case
+are multilib systems where binutils is 64-bit and clang is 32-bit,
+therefore the gold plugin is installed in 64-bit libdir while clang
+is not.
+
+Bug: https://llvm.org/bugs/show_bug.cgi?id=23793
+Patch: https://reviews.llvm.org/D23754
+---
+ CMakeLists.txt | 3 +++
+ include/clang/Config/config.h.cmake | 3 +++
+ lib/Driver/Tools.cpp | 2 +-
+ 3 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 67b85b5..8ed8c10 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -239,6 +239,9 @@ set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE
+ STRING "Define suffix of library directory name for clang runtime (32/64)")
+ set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${CLANG_LIBDIR_SUFFIX})
+
++set(CLANG_GOLD_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE
++ STRING "Define suffix of library directory name that contains LLVMgold.so (32/64)")
++
+ set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+
+diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
+index 9bf9ea5..26e0e7e 100644
+--- a/include/clang/Config/config.h.cmake
++++ b/include/clang/Config/config.h.cmake
+@@ -20,6 +20,9 @@
+ /* Multilib suffix for libdir. */
+ #define CLANG_LIBDIR_SUFFIX "${CLANG_LIBDIR_SUFFIX}"
+
++/* Multilib suffix for libdir containing LLVMgold.so. */
++#define CLANG_GOLD_LIBDIR_SUFFIX "${CLANG_GOLD_LIBDIR_SUFFIX}"
++
+ /* Relative directory for resource files */
+ #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}"
+
+diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
+index a814df3..333a2e9 100644
+--- a/lib/Driver/Tools.cpp
++++ b/lib/Driver/Tools.cpp
+@@ -2007,7 +2007,7 @@ static void AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args,
+ // forward.
+ CmdArgs.push_back("-plugin");
+ std::string Plugin =
+- ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so";
++ ToolChain.getDriver().Dir + "/../lib" CLANG_GOLD_LIBDIR_SUFFIX "/LLVMgold.so";
+ CmdArgs.push_back(Args.MakeArgString(Plugin));
+
+ // Try to pass driver level flags relevant to LTO code generation down to
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch b/sys-devel/clang/files/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
new file mode 100644
index 0000000..0ecd5bc
--- /dev/null
+++ b/sys-devel/clang/files/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
@@ -0,0 +1,64 @@
+From 8dd12df445c9a35f7b1c0202eb7c74b954b0980d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:31:55 +0200
+Subject: [PATCH 7/7] cmake: Support stand-alone Sphinx & doxygen doc build
+
+Copy the necessary options and configuration checks from LLVM to clang,
+to support stand-alone documentation builds.
+
+Patch: https://reviews.llvm.org/D23758
+---
+ CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8ed8c10..3f34d8c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -162,6 +162,43 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
+ endif()
+ endif()
+
++ option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
++ option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
++ option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OFF)
++ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
++
++ if (LLVM_ENABLE_DOXYGEN)
++ message(STATUS "Doxygen enabled.")
++ find_package(Doxygen REQUIRED)
++
++ if (DOXYGEN_FOUND)
++ # If we find doxygen and we want to enable doxygen by default create a
++ # global aggregate doxygen target for generating llvm and any/all
++ # subprojects doxygen documentation.
++ if (LLVM_BUILD_DOCS)
++ add_custom_target(doxygen ALL)
++ endif()
++
++ option(LLVM_DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
++ if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
++ set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external search.")
++ set(LLVM_DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
++ endif()
++ endif()
++ else()
++ message(STATUS "Doxygen disabled.")
++ endif()
++
++ if (LLVM_ENABLE_SPHINX)
++ message(STATUS "Sphinx enabled.")
++ find_package(Sphinx REQUIRED)
++ if (LLVM_BUILD_DOCS)
++ add_custom_target(sphinx ALL)
++ endif()
++ else()
++ message(STATUS "Sphinx disabled.")
++ endif()
++
+ set( CLANG_BUILT_STANDALONE 1 )
+ set(BACKEND_PACKAGE_STRING "LLVM ${LLVM_PACKAGE_VERSION}")
+ else()
+--
+2.9.3
+
diff --git a/sys-devel/clang/metadata.xml b/sys-devel/clang/metadata.xml
index 28f4559..38b8ec4 100644
--- a/sys-devel/clang/metadata.xml
+++ b/sys-devel/clang/metadata.xml
@@ -27,6 +27,8 @@ A simple and hackable code base
A single unified parser for C, Objective C, C++, and Objective C++
Conformance with C/C++/ObjC and their variants</longdescription>
<use>
+ <flag name="default-compiler-rt">Use compiler-rt instead of libgcc as the default rtlib for clang</flag>
+ <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag>
<flag name="multitarget">Build all host targets (default: host only)</flag>
<flag name="static-analyzer">Install the Clang static analyzer</flag>
</use>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/
@ 2016-08-23 20:32 Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2016-08-23 20:32 UTC (permalink / raw
To: gentoo-commits
commit: 7ac0203c113cd880e7a6bc249206e9b006860f95
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 23 20:31:19 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 23 20:32:17 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ac0203c
sys-devel/clang: rlimits check patch has been applied upstream
sys-devel/clang/clang-9999.ebuild | 2 -
...ort-checking-for-rlimits-via-cmake-when-b.patch | 84 ----------------------
2 files changed, 86 deletions(-)
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
index ad0fcf3..5d96509 100644
--- a/sys-devel/clang/clang-9999.ebuild
+++ b/sys-devel/clang/clang-9999.ebuild
@@ -90,8 +90,6 @@ src_prepare() {
# automatically select active system GCC's libraries, bugs #406163 and #417913
# TODO: cross-linux tests broken by this one
eapply "${FILESDIR}"/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
- # use cmake checks for rlimits, rather than __has_include_next()
- eapply "${FILESDIR}"/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
# adjust llvm-lit search to match LLVM cmake macros
eapply "${FILESDIR}"/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
# support overriding clang runtime install directory
diff --git a/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch b/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
deleted file mode 100644
index 16d63ec..00000000
--- a/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 27b65490c9764d18fa02274bbb4f75dd5a688506 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 21 Aug 2016 23:30:17 +0200
-Subject: [PATCH 3/7] driver: Support checking for rlimits via cmake (when
- bootstrapping)
-
-Add a cmake check for sys/resource.h and replace the __has_include()
-check with its result, in order to make it possible to use rlimits when
-building with compilers not supporting __has_include() -- i.e. when
-bootstrapping.
-
-Patch: https://reviews.llvm.org/D23744
----
- CMakeLists.txt | 3 +++
- include/clang/Config/config.h.cmake | 3 +++
- tools/driver/cc1_main.cpp | 8 +++-----
- 3 files changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e6dde85..aee0d0a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -177,6 +177,9 @@ if (LIBXML2_FOUND)
- set(CLANG_HAVE_LIBXML 1)
- endif()
-
-+include(CheckIncludeFile)
-+check_include_file(sys/resource.h CLANG_HAVE_RLIMITS)
-+
- set(CLANG_RESOURCE_DIR "" CACHE STRING
- "Relative directory from the Clang binary to its resource files.")
-
-diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
-index 9200ed9..9bf9ea5 100644
---- a/include/clang/Config/config.h.cmake
-+++ b/include/clang/Config/config.h.cmake
-@@ -35,6 +35,9 @@
- /* Define if we have libxml2 */
- #cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML}
-
-+/* Define if we have sys/resource.h (rlimits) */
-+#cmakedefine CLANG_HAVE_RLIMITS ${CLANG_HAVE_RLIMITS}
-+
- /* The LLVM product name and version */
- #define BACKEND_PACKAGE_STRING "${BACKEND_PACKAGE_STRING}"
-
-diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
-index b8cea41..45d44a0 100644
---- a/tools/driver/cc1_main.cpp
-+++ b/tools/driver/cc1_main.cpp
-@@ -15,6 +15,7 @@
-
- #include "llvm/Option/Arg.h"
- #include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
-+#include "clang/Config/config.h"
- #include "clang/Driver/DriverDiagnostic.h"
- #include "clang/Driver/Options.h"
- #include "clang/Frontend/CompilerInstance.h"
-@@ -37,12 +38,9 @@
- #include "llvm/Support/raw_ostream.h"
- #include <cstdio>
-
--#ifdef __has_include
--#if __has_include(<sys/resource.h>)
--#define HAVE_RLIMITS
-+#ifdef CLANG_HAVE_RLIMITS
- #include <sys/resource.h>
- #endif
--#endif
-
- using namespace clang;
- using namespace llvm::opt;
-@@ -73,7 +71,7 @@ void initializePollyPasses(llvm::PassRegistry &Registry);
- }
- #endif
-
--#ifdef HAVE_RLIMITS
-+#ifdef CLANG_HAVE_RLIMITS
- // The amount of stack we think is "sufficient". If less than this much is
- // available, we may be unable to reach our template instantiation depth
- // limit and other similar limits.
---
-2.9.3
-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/
@ 2016-09-02 21:40 Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2016-09-02 21:40 UTC (permalink / raw
To: gentoo-commits
commit: d236c73285432b874fea74b1e4f6afc7b606e751
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 2 20:32:48 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 2 21:40:00 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d236c732
sys-devel/clang: Remove unnecessary llvm-lit search patch
Remove the llvm-lit search patch since it is no longer necessary and its
correctness is doubtful. Per https://reviews.llvm.org/D23743 the name
llvm-lit is not intended for system-wide install of lit. However, this
does not matter since the internal copy of lit is used when LLVM source
checkout is available, and unittests require this checkout to be
available when running tests.
sys-devel/clang/clang-9999.ebuild | 2 --
...t-llvm-lit-search-to-match-the-one-in-LLV.patch | 29 ----------------------
2 files changed, 31 deletions(-)
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
index 862afbd..1c89ad5 100644
--- a/sys-devel/clang/clang-9999.ebuild
+++ b/sys-devel/clang/clang-9999.ebuild
@@ -99,8 +99,6 @@ src_prepare() {
# automatically select active system GCC's libraries, bugs #406163 and #417913
# TODO: cross-linux tests broken by this one
eapply "${FILESDIR}"/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
- # adjust llvm-lit search to match LLVM cmake macros
- eapply "${FILESDIR}"/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
# support overriding clang runtime install directory
eapply "${FILESDIR}"/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
# support overriding LLVMgold.so plugin directory
diff --git a/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch b/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
deleted file mode 100644
index bcf409c..00000000
--- a/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d7bc0e05e8064e0c939db6c2fb6d215fd0340708 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 21 Aug 2016 23:30:39 +0200
-Subject: [PATCH 4/7] cmake: Adjust llvm-lit search to match the one in LLVM
-
-Adjust the system lit executable search to look for llvm-lit as that is
-the name used in AddLLVM.cmake installed by LLVM.
-
-Patch: https://reviews.llvm.org/D23745
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index aee0d0a..e95ab52 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -140,7 +140,7 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
- endif()
- else()
- # Seek installed Lit.
-- find_program(LLVM_LIT "lit.py" ${LLVM_MAIN_SRC_DIR}/utils/lit
-+ find_program(LLVM_LIT "llvm-lit" ${LLVM_MAIN_SRC_DIR}/utils/lit
- DOC "Path to lit.py")
- endif()
-
---
-2.9.3
-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/
@ 2016-10-25 16:42 Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2016-10-25 16:42 UTC (permalink / raw
To: gentoo-commits
commit: 28b21272899b99cdf5784fd85c7857afe719ff02
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 15:41:05 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 16:42:12 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28b21272
sys-devel/clang: gcc-config patch went upstream
sys-devel/clang/clang-9999.ebuild | 2 -
...ort-obtaining-active-toolchain-from-gcc-c.patch | 52 ----------------------
2 files changed, 54 deletions(-)
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
index a4bbcfa..6a09eb1 100644
--- a/sys-devel/clang/clang-9999.ebuild
+++ b/sys-devel/clang/clang-9999.ebuild
@@ -115,8 +115,6 @@ src_unpack() {
src_prepare() {
python_setup
- # automatically select active system GCC's libraries, bugs #406163 and #417913
- eapply "${FILESDIR}"/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
# support overriding clang runtime install directory
eapply "${FILESDIR}"/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
# support overriding LLVMgold.so plugin directory
diff --git a/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch b/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
deleted file mode 100644
index 00bf280..00000000
--- a/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 0384060d2de35ee56aa252cc18eccf773d674d56 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] driver: Support obtaining active toolchain from gcc-config on
- Gentoo
-
-Author: Richard Yao <ryao@gentoo.org>
-Bug: https://bugs.gentoo.org/406163
-Bug: https://bugs.gentoo.org/417913
----
- lib/Driver/ToolChains.cpp | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
-index 67f165c..0f0d786 100644
---- a/lib/Driver/ToolChains.cpp
-+++ b/lib/Driver/ToolChains.cpp
-@@ -1430,6 +1430,31 @@ void Generic_GCC::GCCInstallationDetector::init(
- }
- }
-
-+ // Try to respect gcc-config on Gentoo. However, do that only
-+ // if --gcc-toolchain is not provided or equal to the Gentoo default.
-+ // This avoids accidentally enforcing system GCC version when using
-+ // a custom toolchain.
-+ if (GCCToolchainDir == "" || GCCToolchainDir == D.SysRoot + "/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.10.0
-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/
@ 2016-11-01 0:41 Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2016-11-01 0:41 UTC (permalink / raw
To: gentoo-commits
commit: 4022af8479305a46fe5d9e94ea78342e9a13b7d8
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 1 00:35:07 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 1 00:41:18 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4022af84
sys-devel/clang: Replace the non-upstreamable lib/clang patch
Replace the non-upstream patch allowing us to alter path for lib/clang
with the use of upstream CLANG_RESOURCE_DIR option (to fix file search
in driver code) combined with necessary symlinking (for tests) and moves
(for install) of installed headers.
sys-devel/clang/clang-9999.ebuild | 16 +++-
...rting-overriding-runtime-libdir-via-CLANG.patch | 86 ----------------------
2 files changed, 12 insertions(+), 90 deletions(-)
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
index 689eaae..a962a81 100644
--- a/sys-devel/clang/clang-9999.ebuild
+++ b/sys-devel/clang/clang-9999.ebuild
@@ -115,8 +115,6 @@ src_unpack() {
src_prepare() {
python_setup
- # support overriding clang runtime install directory
- eapply "${FILESDIR}"/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
# fix stand-alone doc build
eapply "${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
@@ -125,11 +123,13 @@ src_prepare() {
}
multilib_src_configure() {
+ # TODO: read it?
+ local clang_version=4.0.0
local libdir=$(get_libdir)
local mycmakeargs=(
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- # install clang runtime straight into /usr/lib
- -DCLANG_LIBDIR_SUFFIX=""
+ # relative to bindir
+ -DCLANG_RESOURCE_DIR="../lib/clang/${clang_version}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
@@ -189,6 +189,9 @@ multilib_src_configure() {
multilib_src_compile() {
cmake-utils_src_compile
+
+ # provide a symlink for tests
+ ln -s "../$(get_libdir)/clang" lib/clang || die
}
multilib_src_test() {
@@ -243,6 +246,11 @@ src_install() {
multilib_src_install() {
cmake-utils_src_install
+
+ # move headers to the correct directory
+ dodir /usr/lib/clang
+ cp -pR "${ED}usr/$(get_libdir)/clang"/* "${ED}usr/lib/clang/" || die
+ rm -r "${ED}usr/$(get_libdir)/clang" || die
}
multilib_src_install_all() {
diff --git a/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch b/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
deleted file mode 100644
index da737c1..00000000
--- a/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 8864d8f9da1b30c9539e9dc0388c5d0dccca3a34 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 21 Aug 2016 23:31:06 +0200
-Subject: [PATCH 5/7] cmake: Supporting overriding runtime libdir via
- CLANG_LIBDIR_SUFFIX
-
-Make it possible to override the value of CLANG_LIBDIR_SUFFIX, and use
-it uniformly to control install location of runtimes (i.e. lib/clang),
-therefore supporting sharing a common runtime between multiple multilib
-variants.
-
-Previously, CLANG_LIBDIR_SUFFIX was pinned to LLVM_LIBDIR_SUFFIX
-and used only to define runtime path in driver code. This patch extends
-its use to building and installing the runtime (the former is needed for
-tests to work correctly).
-
-The goal is to support install layout alike "LLVM_LIBDIR_SUFFIX=64
-CLANG_LIBDIR_SUFFIX=''" -- where all shared libraries would be installed
-into ABI-specific /usr/lib64, while runtime (that is common between
-multilib ABIs) would be installed into /usr/lib.
-
-Bug: https://llvm.org/bugs/show_bug.cgi?id=23792
-Patch: https://reviews.llvm.org/D23752
----
- CMakeLists.txt | 5 +++--
- lib/Headers/CMakeLists.txt | 4 ++--
- runtime/CMakeLists.txt | 4 ++--
- 3 files changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e95ab52..67b85b5 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -235,8 +235,9 @@ endif()
- 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 "Define suffix of library directory name for clang runtime (32/64)")
-+set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${CLANG_LIBDIR_SUFFIX})
-
- set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
- set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
-diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
-index 600fece..86a70c5 100644
---- a/lib/Headers/CMakeLists.txt
-+++ b/lib/Headers/CMakeLists.txt
-@@ -88,7 +88,7 @@ set(files
- xtestintrin.h
- )
-
--set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
-+set(output_dir ${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
-
- # Generate arm_neon.h
- clang_tablegen(arm_neon.h -gen-arm-neon
-@@ -118,7 +118,7 @@ install(
- FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
- COMPONENT clang-headers
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
-+ DESTINATION lib${CLANG_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
-
- if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
- add_custom_target(install-clang-headers
-diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
-index 814857f..9348615 100644
---- a/runtime/CMakeLists.txt
-+++ b/runtime/CMakeLists.txt
-@@ -71,9 +71,9 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
- -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
- -DLLVM_CONFIG_PATH=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-config
- -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS}
-- -DCOMPILER_RT_OUTPUT_DIR=${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}
-+ -DCOMPILER_RT_OUTPUT_DIR=${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}
- -DCOMPILER_RT_EXEC_OUTPUT_DIR=${LLVM_RUNTIME_OUTPUT_INTDIR}
-- -DCOMPILER_RT_INSTALL_PATH:STRING=lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}
-+ -DCOMPILER_RT_INSTALL_PATH:STRING=lib${CLANG_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}
- -DCOMPILER_RT_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
- -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
- -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX}
---
-2.9.3
-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/
@ 2017-01-24 17:30 Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2017-01-24 17:30 UTC (permalink / raw
To: gentoo-commits
commit: 49879b6d7ebc70f19307393db44d853407d1f2c6
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 17:14:59 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 24 17:30:40 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49879b6d
sys-devel/clang: Fix matching clangrt libs to arch (on x86)
sys-devel/clang/clang-4.0.0_rc1.ebuild | 3 +
sys-devel/clang/clang-9999.ebuild | 3 +
...arch-type-to-find-compiler-rt-libraries-o.patch | 136 +++++++++++++++++++++
3 files changed, 142 insertions(+)
diff --git a/sys-devel/clang/clang-4.0.0_rc1.ebuild b/sys-devel/clang/clang-4.0.0_rc1.ebuild
index 4914a70..2dbae1f 100644
--- a/sys-devel/clang/clang-4.0.0_rc1.ebuild
+++ b/sys-devel/clang/clang-4.0.0_rc1.ebuild
@@ -127,6 +127,9 @@ src_unpack() {
src_prepare() {
python_setup
+ # fix finding compiler-rt libs
+ eapply "${FILESDIR}"/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
+
# fix stand-alone doc build
eapply "${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
index 25e52b2..f3b9ea7 100644
--- a/sys-devel/clang/clang-9999.ebuild
+++ b/sys-devel/clang/clang-9999.ebuild
@@ -123,6 +123,9 @@ src_unpack() {
src_prepare() {
python_setup
+ # fix finding compiler-rt libs
+ eapply "${FILESDIR}"/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
+
# fix stand-alone doc build
eapply "${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
diff --git a/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch b/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
new file mode 100644
index 00000000..7d53cbd
--- /dev/null
+++ b/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
@@ -0,0 +1,136 @@
+From 19e3dc0ce4949cc7f869b4552c6a7f28cd59c3b7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 17 Nov 2016 14:19:18 +0100
+Subject: [PATCH] [Driver] Use arch type to find compiler-rt libraries (on
+ Linux)
+
+Use llvm::Triple::getArchTypeName() when looking for compiler-rt
+libraries, rather than the exact arch string from the triple. This is
+more correct as it matches the values used when building compiler-rt
+(builtin-config-ix.cmake) which are the subset of the values allowed
+in triples.
+
+For example, this fixes an issue when the compiler set for
+i686-pc-linux-gnu triple would not find an i386 compiler-rt library,
+while this is the exact arch that is detected by compiler-rt. The same
+applies to any other i?86 variant allowed by LLVM.
+
+This also makes the special case for MSVC unnecessary, since now i386
+will be used reliably for all 32-bit x86 variants.
+---
+ lib/Driver/ToolChain.cpp | 5 +----
+ .../usr/i686-unknown-linux/lib/.keep | 0
+ .../usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o | 0
+ test/Driver/linux-ld.c | 21 +++++++++++++++++++++
+ test/Driver/nostdlib.c | 2 +-
+ test/Driver/print-libgcc-file-name-clangrt.c | 10 ++++++++--
+ test/Driver/windows-cross.c | 2 +-
+ 7 files changed, 32 insertions(+), 8 deletions(-)
+ create mode 100644 test/Driver/Inputs/basic_linux_tree/usr/i686-unknown-linux/lib/.keep
+ create mode 100644 test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o
+
+diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
+index 6adc0386ee..7e4222f087 100644
+--- a/lib/Driver/ToolChain.cpp
++++ b/lib/Driver/ToolChain.cpp
+@@ -283,15 +283,12 @@ static StringRef getArchNameForCompilerRTLib(const ToolChain &TC,
+ const llvm::Triple &Triple = TC.getTriple();
+ bool IsWindows = Triple.isOSWindows();
+
+- if (Triple.isWindowsMSVCEnvironment() && TC.getArch() == llvm::Triple::x86)
+- return "i386";
+-
+ if (TC.getArch() == llvm::Triple::arm || TC.getArch() == llvm::Triple::armeb)
+ return (arm::getARMFloatABI(TC, Args) == arm::FloatABI::Hard && !IsWindows)
+ ? "armhf"
+ : "arm";
+
+- return TC.getArchName();
++ return llvm::Triple::getArchTypeName(TC.getArch());
+ }
+
+ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
+diff --git a/test/Driver/Inputs/basic_linux_tree/usr/i686-unknown-linux/lib/.keep b/test/Driver/Inputs/basic_linux_tree/usr/i686-unknown-linux/lib/.keep
+new file mode 100644
+index 0000000000..e69de29bb2
+diff --git a/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o b/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o
+new file mode 100644
+index 0000000000..e69de29bb2
+diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c
+index e5aa870866..92b199b9d4 100644
+--- a/test/Driver/linux-ld.c
++++ b/test/Driver/linux-ld.c
+@@ -71,6 +71,27 @@
+ // CHECK-LD-RT: libclang_rt.builtins-x86_64.a"
+ //
+ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
++// RUN: --target=i686-unknown-linux \
++// RUN: --gcc-toolchain="" \
++// RUN: --sysroot=%S/Inputs/basic_linux_tree \
++// RUN: --rtlib=compiler-rt \
++// RUN: | FileCheck --check-prefix=CHECK-LD-RT-I686 %s
++// CHECK-LD-RT-I686-NOT: warning:
++// CHECK-LD-RT-I686: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
++// CHECK-LD-RT-I686: "--eh-frame-hdr"
++// CHECK-LD-RT-I686: "-m" "elf_i386"
++// CHECK-LD-RT-I686: "-dynamic-linker"
++// CHECK-LD-RT-I686: "{{.*}}/usr/lib/gcc/i686-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
++// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib/gcc/i686-unknown-linux/4.6.0"
++// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib/gcc/i686-unknown-linux/4.6.0/../../../../i686-unknown-linux/lib"
++// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib/gcc/i686-unknown-linux/4.6.0/../../.."
++// CHECK-LD-RT-I686: "-L[[SYSROOT]]/lib"
++// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib"
++// CHECK-LD-RT-I686: libclang_rt.builtins-i386.a"
++// CHECK-LD-RT-I686: "-lc"
++// CHECK-LD-RT-I686: libclang_rt.builtins-i386.a"
++//
++// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+ // RUN: --target=arm-linux-androideabi \
+ // RUN: --gcc-toolchain="" \
+ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+diff --git a/test/Driver/nostdlib.c b/test/Driver/nostdlib.c
+index a9ef665c57..c9793d968c 100644
+--- a/test/Driver/nostdlib.c
++++ b/test/Driver/nostdlib.c
+@@ -27,5 +27,5 @@
+ //
+ // CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt'
+ // CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+-// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.builtins-i686.a"
++// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.builtins-i386.a"
+ // CHECK-MSVC-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt'
+diff --git a/test/Driver/print-libgcc-file-name-clangrt.c b/test/Driver/print-libgcc-file-name-clangrt.c
+index 9f8120c31d..28c758881d 100644
+--- a/test/Driver/print-libgcc-file-name-clangrt.c
++++ b/test/Driver/print-libgcc-file-name-clangrt.c
+@@ -6,6 +6,12 @@
+ // CHECK-CLANGRT-X8664: libclang_rt.builtins-x86_64.a
+
+ // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
++// RUN: --target=i386-pc-linux \
++// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
++// CHECK-CLANGRT-I386: libclang_rt.builtins-i386.a
++
++// Check whether alternate arch values map to the correct library.
++//
++// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
+ // RUN: --target=i686-pc-linux \
+-// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I686 %s
+-// CHECK-CLANGRT-I686: libclang_rt.builtins-i686.a
++// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
+diff --git a/test/Driver/windows-cross.c b/test/Driver/windows-cross.c
+index 5a2fe52b09..78b4981c9d 100644
+--- a/test/Driver/windows-cross.c
++++ b/test/Driver/windows-cross.c
+@@ -59,7 +59,7 @@
+ // RUN: | FileCheck %s --check-prefix CHECK-SANITIZE-ADDRESS-EXE-X86
+
+ // CHECK-SANITIZE-ADDRESS-EXE-X86: "-fsanitize=address"
+-// CHECK-SANITIZE-ADDRESS-EXE-X86: "{{.*}}clang_rt.asan_dynamic-i686.lib" "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i686.lib" "--undefined" "___asan_seh_interceptor"
++// CHECK-SANITIZE-ADDRESS-EXE-X86: "{{.*}}clang_rt.asan_dynamic-i386.lib" "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib" "--undefined" "___asan_seh_interceptor"
+
+ // RUN: %clang -### -target armv7-windows-itanium --sysroot %S/Inputs/Windows/ARM/8.1 -B %S/Inputs/Windows/ARM/8.1/usr/bin -fuse-ld=lld-link2 -shared -o shared.dll -fsanitize=tsan -x c++ %s 2>&1 \
+ // RUN: | FileCheck %s --check-prefix CHECK-SANITIZE-TSAN
+--
+2.11.0
+
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-24 17:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-01 0:41 [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2017-01-24 17:30 Michał Górny
2016-10-25 16:42 Michał Górny
2016-09-02 21:40 Michał Górny
2016-08-23 20:32 Michał Górny
2016-08-22 15:12 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox