Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/9999/
Date: Tue, 23 Aug 2016 20:32:35
Message-Id: 1471984337.7ac0203c113cd880e7a6bc249206e9b006860f95.mgorny@gentoo
1 commit: 7ac0203c113cd880e7a6bc249206e9b006860f95
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 23 20:31:19 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 23 20:32:17 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ac0203c
7
8 sys-devel/clang: rlimits check patch has been applied upstream
9
10 sys-devel/clang/clang-9999.ebuild | 2 -
11 ...ort-checking-for-rlimits-via-cmake-when-b.patch | 84 ----------------------
12 2 files changed, 86 deletions(-)
13
14 diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
15 index ad0fcf3..5d96509 100644
16 --- a/sys-devel/clang/clang-9999.ebuild
17 +++ b/sys-devel/clang/clang-9999.ebuild
18 @@ -90,8 +90,6 @@ src_prepare() {
19 # automatically select active system GCC's libraries, bugs #406163 and #417913
20 # TODO: cross-linux tests broken by this one
21 eapply "${FILESDIR}"/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
22 - # use cmake checks for rlimits, rather than __has_include_next()
23 - eapply "${FILESDIR}"/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
24 # adjust llvm-lit search to match LLVM cmake macros
25 eapply "${FILESDIR}"/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
26 # support overriding clang runtime install directory
27
28 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
29 deleted file mode 100644
30 index 16d63ec..00000000
31 --- a/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
32 +++ /dev/null
33 @@ -1,84 +0,0 @@
34 -From 27b65490c9764d18fa02274bbb4f75dd5a688506 Mon Sep 17 00:00:00 2001
35 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
36 -Date: Sun, 21 Aug 2016 23:30:17 +0200
37 -Subject: [PATCH 3/7] driver: Support checking for rlimits via cmake (when
38 - bootstrapping)
39 -
40 -Add a cmake check for sys/resource.h and replace the __has_include()
41 -check with its result, in order to make it possible to use rlimits when
42 -building with compilers not supporting __has_include() -- i.e. when
43 -bootstrapping.
44 -
45 -Patch: https://reviews.llvm.org/D23744
46 ----
47 - CMakeLists.txt | 3 +++
48 - include/clang/Config/config.h.cmake | 3 +++
49 - tools/driver/cc1_main.cpp | 8 +++-----
50 - 3 files changed, 9 insertions(+), 5 deletions(-)
51 -
52 -diff --git a/CMakeLists.txt b/CMakeLists.txt
53 -index e6dde85..aee0d0a 100644
54 ---- a/CMakeLists.txt
55 -+++ b/CMakeLists.txt
56 -@@ -177,6 +177,9 @@ if (LIBXML2_FOUND)
57 - set(CLANG_HAVE_LIBXML 1)
58 - endif()
59 -
60 -+include(CheckIncludeFile)
61 -+check_include_file(sys/resource.h CLANG_HAVE_RLIMITS)
62 -+
63 - set(CLANG_RESOURCE_DIR "" CACHE STRING
64 - "Relative directory from the Clang binary to its resource files.")
65 -
66 -diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
67 -index 9200ed9..9bf9ea5 100644
68 ---- a/include/clang/Config/config.h.cmake
69 -+++ b/include/clang/Config/config.h.cmake
70 -@@ -35,6 +35,9 @@
71 - /* Define if we have libxml2 */
72 - #cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML}
73 -
74 -+/* Define if we have sys/resource.h (rlimits) */
75 -+#cmakedefine CLANG_HAVE_RLIMITS ${CLANG_HAVE_RLIMITS}
76 -+
77 - /* The LLVM product name and version */
78 - #define BACKEND_PACKAGE_STRING "${BACKEND_PACKAGE_STRING}"
79 -
80 -diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
81 -index b8cea41..45d44a0 100644
82 ---- a/tools/driver/cc1_main.cpp
83 -+++ b/tools/driver/cc1_main.cpp
84 -@@ -15,6 +15,7 @@
85 -
86 - #include "llvm/Option/Arg.h"
87 - #include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
88 -+#include "clang/Config/config.h"
89 - #include "clang/Driver/DriverDiagnostic.h"
90 - #include "clang/Driver/Options.h"
91 - #include "clang/Frontend/CompilerInstance.h"
92 -@@ -37,12 +38,9 @@
93 - #include "llvm/Support/raw_ostream.h"
94 - #include <cstdio>
95 -
96 --#ifdef __has_include
97 --#if __has_include(<sys/resource.h>)
98 --#define HAVE_RLIMITS
99 -+#ifdef CLANG_HAVE_RLIMITS
100 - #include <sys/resource.h>
101 - #endif
102 --#endif
103 -
104 - using namespace clang;
105 - using namespace llvm::opt;
106 -@@ -73,7 +71,7 @@ void initializePollyPasses(llvm::PassRegistry &Registry);
107 - }
108 - #endif
109 -
110 --#ifdef HAVE_RLIMITS
111 -+#ifdef CLANG_HAVE_RLIMITS
112 - // The amount of stack we think is "sufficient". If less than this much is
113 - // available, we may be unable to reach our template instantiation depth
114 - // limit and other similar limits.
115 ---
116 -2.9.3
117 -