Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 406163 | Differences between
and this patch

Collapse All | Expand All

(-)a/llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp (-1 / +15 lines)
Lines 1382-1387 enum LinuxDistro { Link Here
1382
  DebianSqueeze,
1382
  DebianSqueeze,
1383
  DebianWheezy,
1383
  DebianWheezy,
1384
  Exherbo,
1384
  Exherbo,
1385
  Gentoo,
1385
  RHEL4,
1386
  RHEL4,
1386
  RHEL5,
1387
  RHEL5,
1387
  RHEL6,
1388
  RHEL6,
Lines 1403-1408 enum LinuxDistro { Link Here
1403
  UnknownDistro
1404
  UnknownDistro
1404
};
1405
};
1405
1406
1407
static bool IsGentoo(enum LinuxDistro Distro) {
1408
  return Distro == Gentoo;
1409
}
1410
1406
static bool IsRedhat(enum LinuxDistro Distro) {
1411
static bool IsRedhat(enum LinuxDistro Distro) {
1407
  return Distro == Fedora13 || Distro == Fedora14 ||
1412
  return Distro == Fedora13 || Distro == Fedora14 ||
1408
         Distro == Fedora15 || Distro == FedoraRawhide ||
1413
         Distro == Fedora15 || Distro == FedoraRawhide ||
Lines 1433-1439 static LinuxDistro DetectLinuxDistro(llv Link Here
1433
    SmallVector<StringRef, 8> Lines;
1438
    SmallVector<StringRef, 8> Lines;
1434
    Data.split(Lines, "\n");
1439
    Data.split(Lines, "\n");
1435
    for (unsigned int i = 0, s = Lines.size(); i < s; ++ i) {
1440
    for (unsigned int i = 0, s = Lines.size(); i < s; ++ i) {
1436
      if (Lines[i] == "DISTRIB_CODENAME=hardy")
1441
      if (Lines[i] == "DISTRIB_ID=\"Gentoo\"")
1442
        return Gentoo;
1443
      else if (Lines[i] == "DISTRIB_CODENAME=hardy")
1437
        return UbuntuHardy;
1444
        return UbuntuHardy;
1438
      else if (Lines[i] == "DISTRIB_CODENAME=intrepid")
1445
      else if (Lines[i] == "DISTRIB_CODENAME=intrepid")
1439
        return UbuntuIntrepid;
1446
        return UbuntuIntrepid;
Lines 1597-1602 Linux::GCCInstallationDetector::GCCInsta Link Here
1597
    GccInstallPath.append("/");
1604
    GccInstallPath.append("/");
1598
    GccInstallPath.append(CXX_INCLUDE_ARCH);
1605
    GccInstallPath.append(CXX_INCLUDE_ARCH);
1599
    GccInstallPath.append("/");
1606
    GccInstallPath.append("/");
1607
    llvm::OwningPtr<llvm::MemoryBuffer> File;
1608
    if (!llvm::MemoryBuffer::getFile("/etc/env.d/gcc/config-" + D.DefaultHostTriple, File)) {
1609
      SmallVector<StringRef, 8> Components;
1610
      StringRef Data = File.get()->getBuffer();
1611
      Data.split(Components, "-");
1612
      Version = Components[3];
1613
    }
1600
    GccInstallPath.append(Version);
1614
    GccInstallPath.append(Version);
1601
    GccParentLibPath = GccInstallPath + "/../../..";
1615
    GccParentLibPath = GccInstallPath + "/../../..";
1602
    IsValid = true;
1616
    IsValid = true;

Return to bug 406163