public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/files/, sys-devel/llvm/
Date: Thu, 12 May 2016 11:49:47 +0000 (UTC)	[thread overview]
Message-ID: <1463053721.0cb681567736f4f580e0d0a9aae65553566109c1.mgorny@gentoo> (raw)

commit:     0cb681567736f4f580e0d0a9aae65553566109c1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 11 20:52:13 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May 12 11:48:41 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cb68156

sys-devel/llvm: Backport upstream patch for gcc4.9 Gentoo header paths

 .../llvm/files/clang-3.8-gcc4.9-search-path.patch  | 70 ++++++++++++++++++++++
 .../{llvm-3.7.1-r1.ebuild => llvm-3.7.1-r2.ebuild} |  4 ++
 .../{llvm-3.8.0-r1.ebuild => llvm-3.8.0-r2.ebuild} |  4 ++
 3 files changed, 78 insertions(+)

diff --git a/sys-devel/llvm/files/clang-3.8-gcc4.9-search-path.patch b/sys-devel/llvm/files/clang-3.8-gcc4.9-search-path.patch
new file mode 100644
index 0000000..bafe218
--- /dev/null
+++ b/sys-devel/llvm/files/clang-3.8-gcc4.9-search-path.patch
@@ -0,0 +1,70 @@
+From af4db76e059c1a3f4a7f437001051ccebc8a50fe Mon Sep 17 00:00:00 2001
+From: Chandler Carruth <chandlerc@gmail.com>
+Date: Sun, 8 May 2016 07:59:56 +0000
+Subject: [PATCH] Teach header search about GCC 4.9 header search paths in
+ Gentoo, they now use the full GCC version in their weird suffix.
+
+git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268874 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/Driver/ToolChains.cpp                                 |  1 +
+ .../Inputs/gentoo_linux_gcc_4.9.3_tree/usr/include/.keep  |  0
+ .../usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/crtbegin.o      |  0
+ .../x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/.keep    |  0
+ .../usr/x86_64-pc-linux-gnu/lib/.keep                     |  0
+ test/Driver/linux-header-search.cpp                       | 15 +++++++++++++++
+ 6 files changed, 16 insertions(+)
+ create mode 100644 test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/include/.keep
+ create mode 100644 test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/crtbegin.o
+ create mode 100644 test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/.keep
+ create mode 100644 test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/x86_64-pc-linux-gnu/lib/.keep
+
+diff --git a/tools/clang/lib/Driver/ToolChains.cpp b/tools/clang/lib/Driver/ToolChains.cpp
+index f905b5d..1bf17e4 100644
+--- a/tools/clang/lib/Driver/ToolChains.cpp
++++ b/tools/clang/lib/Driver/ToolChains.cpp
+@@ -4134,6 +4134,7 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+   const std::string LibStdCXXIncludePathCandidates[] = {
+       // Gentoo is weird and places its headers inside the GCC install,
+       // so if the first attempt to find the headers fails, try these patterns.
++      InstallDir.str() + "/include/g++-v" + Version.Text,
+       InstallDir.str() + "/include/g++-v" + Version.MajorStr + "." +
+           Version.MinorStr,
+       InstallDir.str() + "/include/g++-v" + Version.MajorStr,
+diff --git a/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/include/.keep b/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/include/.keep
+new file mode 100644
+index 0000000..e69de29
+diff --git a/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/crtbegin.o b/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/crtbegin.o
+new file mode 100644
+index 0000000..e69de29
+diff --git a/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/.keep b/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/.keep
+new file mode 100644
+index 0000000..e69de29
+diff --git a/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/x86_64-pc-linux-gnu/lib/.keep b/tools/clang/test/Driver/Inputs/gentoo_linux_gcc_4.9.3_tree/usr/x86_64-pc-linux-gnu/lib/.keep
+new file mode 100644
+index 0000000..e69de29
+diff --git a/tools/clang/test/Driver/linux-header-search.cpp b/tools/clang/test/Driver/linux-header-search.cpp
+index 9568bde..5f6ac50 100644
+--- a/tools/clang/test/Driver/linux-header-search.cpp
++++ b/tools/clang/test/Driver/linux-header-search.cpp
+@@ -285,6 +285,21 @@
+ // CHECK-GENTOO-4-6-4: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
+ // CHECK-GENTOO-4-6-4: "-internal-externc-isystem" "[[SYSROOT]]/include"
+ // CHECK-GENTOO-4-6-4: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
++// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
++// RUN:     -target x86_64-unknown-linux-gnu -stdlib=libstdc++ \
++// RUN:     --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.3_tree \
++// RUN:     --gcc-toolchain="" \
++// RUN:   | FileCheck --check-prefix=CHECK-GENTOO-4-9-3 %s
++// CHECK-GENTOO-4-9-3: "{{.*}}clang{{.*}}" "-cc1"
++// CHECK-GENTOO-4-9-3: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
++// CHECK-GENTOO-4-9-3: "-isysroot" "[[SYSROOT:[^"]+]]"
++// CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3"
++// CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/x86_64-pc-linux-gnu"
++// CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/backward"
++// CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
++// CHECK-GENTOO-4-9-3: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
++// CHECK-GENTOO-4-9-3: "-internal-externc-isystem" "[[SYSROOT]]/include"
++// CHECK-GENTOO-4-9-3: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+ //
+ // Check header search on Debian 6 / MIPS64
+ // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \

diff --git a/sys-devel/llvm/llvm-3.7.1-r1.ebuild b/sys-devel/llvm/llvm-3.7.1-r2.ebuild
similarity index 99%
rename from sys-devel/llvm/llvm-3.7.1-r1.ebuild
rename to sys-devel/llvm/llvm-3.7.1-r2.ebuild
index 7bd5432..10e5e16 100644
--- a/sys-devel/llvm/llvm-3.7.1-r1.ebuild
+++ b/sys-devel/llvm/llvm-3.7.1-r2.ebuild
@@ -178,6 +178,10 @@ src_prepare() {
 		# Automatically select active system GCC's libraries, bugs #406163 and #417913
 		eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
 
+		# Support gcc4.9 search paths
+		# https://github.com/llvm-mirror/clang/commit/af4db76e059c1a3
+		eapply "${FILESDIR}"/clang-3.8-gcc4.9-search-path.patch
+
 		eapply "${FILESDIR}"/clang-3.6-gentoo-install.patch
 
 		eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch

diff --git a/sys-devel/llvm/llvm-3.8.0-r1.ebuild b/sys-devel/llvm/llvm-3.8.0-r2.ebuild
similarity index 98%
rename from sys-devel/llvm/llvm-3.8.0-r1.ebuild
rename to sys-devel/llvm/llvm-3.8.0-r2.ebuild
index fe8e3e7..71a927f 100644
--- a/sys-devel/llvm/llvm-3.8.0-r1.ebuild
+++ b/sys-devel/llvm/llvm-3.8.0-r2.ebuild
@@ -174,6 +174,10 @@ src_prepare() {
 		# Automatically select active system GCC's libraries, bugs #406163 and #417913
 		eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
 
+		# Support gcc4.9 search paths
+		# https://github.com/llvm-mirror/clang/commit/af4db76e059c1a3
+		eapply "${FILESDIR}"/clang-3.8-gcc4.9-search-path.patch
+
 		eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
 		eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
 


             reply	other threads:[~2016-05-12 11:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:49 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-09-10  8:55 [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/files/, sys-devel/llvm/ Fabian Groffen
2016-08-21 18:51 Michał Górny
2016-06-23 15:57 Patrice Clement
2016-06-05 11:47 Michał Górny
2016-03-28 21:31 Michał Górny
2016-03-09 13:35 Bernard Cafarelli
2016-01-07 22:10 Michał Górny
2015-12-27 22:52 Michał Górny
2015-12-05 15:50 Michał Górny
2015-10-11 18:41 Bernard Cafarelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463053721.0cb681567736f4f580e0d0a9aae65553566109c1.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox