From 2b34de4f977e58d70e8e39e413f7f67d4fa906fb Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 24 May 2017 17:57:30 +0200 Subject: sys-devel/llvm: Drop 3.9.0 (in favor of 3.9.1) Closes: https://github.com/gentoo/gentoo/pull/4739 --- .../clang/gentoo-runtime-gcc-detection-v3.patch | 42 ++++++++++++++++++++++ .../clang/gentoo-runtime-gcc-detection-v3.patch | 42 ---------------------- 2 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 sys-devel/llvm/files/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch delete mode 100644 sys-devel/llvm/files/3.9.0/clang/gentoo-runtime-gcc-detection-v3.patch (limited to 'sys-devel/llvm/files') diff --git a/sys-devel/llvm/files/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch b/sys-devel/llvm/files/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch new file mode 100644 index 000000000000..1f81af0b7ff0 --- /dev/null +++ b/sys-devel/llvm/files/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch @@ -0,0 +1,42 @@ +From 916572e1243633ddf913c8f32771a3a7f70fd853 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +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> 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/3.9.0/clang/gentoo-runtime-gcc-detection-v3.patch b/sys-devel/llvm/files/3.9.0/clang/gentoo-runtime-gcc-detection-v3.patch deleted file mode 100644 index 1f81af0b7ff0..000000000000 --- a/sys-devel/llvm/files/3.9.0/clang/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?= -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> 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 - -- cgit v1.2.3-65-gdbad