Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/, sys-devel/clang/files/5.0.0/
Date: Tue, 02 Jan 2018 13:54:12
Message-Id: 1514901236.a1b84f8898fc23e1cde3a27bc40f2ccc890e9ff4.grobian@gentoo
1 commit: a1b84f8898fc23e1cde3a27bc40f2ccc890e9ff4
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 2 13:53:46 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 2 13:53:56 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b84f88
7
8 sys-devel/clang: add prefix includes patch for darwin too
9
10 Like for older llvm versions, ensure clang uses the prefix include paths
11 on Darwin.
12
13 Closes: https://bugs.gentoo.org/642644
14 Package-Manager: Portage-2.3.13, Repoman-2.3.3
15
16 sys-devel/clang/clang-5.0.1.ebuild | 11 +++++++++--
17 .../files/5.0.0/darwin_prefix-include-paths.patch | 18 ++++++++++++++++++
18 2 files changed, 27 insertions(+), 2 deletions(-)
19
20 diff --git a/sys-devel/clang/clang-5.0.1.ebuild b/sys-devel/clang/clang-5.0.1.ebuild
21 index 9aeef0ecf6d..2e3b5d39486 100644
22 --- a/sys-devel/clang/clang-5.0.1.ebuild
23 +++ b/sys-devel/clang/clang-5.0.1.ebuild
24 @@ -1,4 +1,4 @@
25 -# Copyright 1999-2017 Gentoo Foundation
26 +# Copyright 1999-2018 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28
29 EAPI=6
30 @@ -9,7 +9,7 @@ CMAKE_MIN_VERSION=3.7.0-r1
31 PYTHON_COMPAT=( python2_7 )
32
33 inherit cmake-utils eapi7-ver flag-o-matic llvm \
34 - multilib-minimal pax-utils python-single-r1 toolchain-funcs
35 + multilib-minimal pax-utils prefix python-single-r1 toolchain-funcs
36
37 MY_P=cfe-${PV/_/}.src
38 EXTRA_P=clang-tools-extra-${PV/_/}.src
39 @@ -68,6 +68,8 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
40 PATCHES=(
41 # fix finding compiler-rt libs
42 "${FILESDIR}"/5.0.0/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
43 + # add Prefix include paths for Darwin
44 + "${FILESDIR}"/5.0.0/darwin_prefix-include-paths.patch
45 )
46
47 # Multilib notes:
48 @@ -110,6 +112,11 @@ src_unpack() {
49 fi
50 }
51
52 +src_prepare() {
53 + default
54 + eprefixify lib/Frontend/InitHeaderSearch.cpp
55 +}
56 +
57 multilib_src_configure() {
58 local llvm_version=$(llvm-config --version) || die
59 local clang_version=$(ver_cut 1-3 "${llvm_version}")
60
61 diff --git a/sys-devel/clang/files/5.0.0/darwin_prefix-include-paths.patch b/sys-devel/clang/files/5.0.0/darwin_prefix-include-paths.patch
62 new file mode 100644
63 index 00000000000..7744b942d0e
64 --- /dev/null
65 +++ b/sys-devel/clang/files/5.0.0/darwin_prefix-include-paths.patch
66 @@ -0,0 +1,18 @@
67 +--- a/lib/Frontend/InitHeaderSearch.cpp
68 ++++ b/lib/Frontend/InitHeaderSearch.cpp
69 +@@ -233,6 +233,7 @@
70 + case llvm::Triple::Bitrig:
71 + break;
72 + default:
73 ++ AddPath("@GENTOO_PORTAGE_EPREFIX@/usr/include", System, false);
74 + // FIXME: temporary hack: hard-coded paths.
75 + AddPath("/usr/local/include", System, false);
76 + break;
77 +@@ -505,6 +506,7 @@
78 + // Add the default framework include paths on Darwin.
79 + if (HSOpts.UseStandardSystemIncludes) {
80 + if (triple.isOSDarwin()) {
81 ++ AddPath("@GENTOO_PORTAGE_EPREFIX@/Frameworks", System, true);
82 + AddPath("/System/Library/Frameworks", System, true);
83 + AddPath("/Library/Frameworks", System, true);
84 + }