mgorny 14/09/18 20:06:55 Modified: clang-3.5-gentoo-runtime-gcc-detection-v3.patch Log: Use simpler llvm::sys::fs::exists() form in gcc version detection code since the other one is deprecated. Bug #523082. (Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Revision Changes Path 1.2 sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch?rev=1.2&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch?rev=1.2&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch?r1=1.1&r2=1.2 Index: clang-3.5-gentoo-runtime-gcc-detection-v3.patch =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- clang-3.5-gentoo-runtime-gcc-detection-v3.patch 7 Sep 2014 11:12:00 -0000 1.1 +++ clang-3.5-gentoo-runtime-gcc-detection-v3.patch 18 Sep 2014 20:06:55 -0000 1.2 @@ -1,17 +1,17 @@ -From 699d0b958b4d8fb42348d324ef805345b0cbc06b Mon Sep 17 00:00:00 2001 +From 916572e1243633ddf913c8f32771a3a7f70fd853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]> Date: Fri, 5 Sep 2014 16:49:35 +0200 Subject: [PATCH] Support obtaining active toolchain from gcc-config. --- - tools/clang/lib/Driver/ToolChains.cpp | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) + 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..f3e986c 100644 +index b46f69d..2d4374d 100644 --- a/tools/clang/lib/Driver/ToolChains.cpp +++ b/tools/clang/lib/Driver/ToolChains.cpp -@@ -1253,6 +1253,26 @@ Generic_GCC::GCCInstallationDetector::init( +@@ -1253,6 +1253,25 @@ Generic_GCC::GCCInstallationDetector::init( Prefixes.push_back("/usr"); } @@ -20,10 +20,9 @@ + llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str()); + if (File) + { -+ bool Exists; + 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", Exists) && Exists) ++ if (llvm::sys::fs::exists(GentooPath + "/crtbegin.o")) + { + Version = GCCVersion::Parse(VersionText); + GCCInstallPath = GentooPath;
