Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 312865 Details for
Bug 406163
sys-devel/clang-9999 detects wrong libstdc++ include / library path
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch proposal that adds runtime detection of correct GCC version
clang-3.0-gentoo.patch (text/plain), 1.78 KB, created by
Richard Yao (RETIRED)
on 2012-05-23 18:51:41 UTC
(
hide
)
Description:
Patch proposal that adds runtime detection of correct GCC version
Filename:
MIME Type:
Creator:
Richard Yao (RETIRED)
Created:
2012-05-23 18:51:41 UTC
Size:
1.78 KB
patch
obsolete
>diff -upNr a/llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp b/llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp >--- a/llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-23 14:25:48.754362000 -0400 >+++ b/llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-23 14:29:21.782743000 -0400 >@@ -1382,6 +1382,7 @@ enum LinuxDistro { > DebianSqueeze, > DebianWheezy, > Exherbo, >+ Gentoo, > RHEL4, > RHEL5, > RHEL6, >@@ -1403,6 +1404,10 @@ enum LinuxDistro { > UnknownDistro > }; > >+static bool IsGentoo(enum LinuxDistro Distro) { >+ return Distro == Gentoo; >+} >+ > static bool IsRedhat(enum LinuxDistro Distro) { > return Distro == Fedora13 || Distro == Fedora14 || > Distro == Fedora15 || Distro == FedoraRawhide || >@@ -1433,7 +1438,9 @@ static LinuxDistro DetectLinuxDistro(llv > SmallVector<StringRef, 8> Lines; > Data.split(Lines, "\n"); > for (unsigned int i = 0, s = Lines.size(); i < s; ++ i) { >- if (Lines[i] == "DISTRIB_CODENAME=hardy") >+ if (Lines[i] == "DISTRIB_ID=\"Gentoo\"") >+ return Gentoo; >+ else if (Lines[i] == "DISTRIB_CODENAME=hardy") > return UbuntuHardy; > else if (Lines[i] == "DISTRIB_CODENAME=intrepid") > return UbuntuIntrepid; >@@ -1597,6 +1604,13 @@ Linux::GCCInstallationDetector::GCCInsta > GccInstallPath.append("/"); > GccInstallPath.append(CXX_INCLUDE_ARCH); > GccInstallPath.append("/"); >+ llvm::OwningPtr<llvm::MemoryBuffer> File; >+ if (!llvm::MemoryBuffer::getFile("/etc/env.d/gcc/config-" + D.DefaultHostTriple, File)) { >+ SmallVector<StringRef, 8> Components; >+ StringRef Data = File.get()->getBuffer(); >+ Data.split(Components, "-"); >+ Version = Components[3]; >+ } > GccInstallPath.append(Version); > GccParentLibPath = GccInstallPath + "/../../.."; > IsValid = true;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 406163
:
312865
|
312871