a1f8ad145e
applied to our copy of llvm/clang. These can be applied in alphabetical order to a pristine llvm/clang 3.4 release source tree, to result in the same version used in FreeBSD. This is intended to clearly document all the changes until now, which mostly consist of cherry pickings from the respective upstream trunks, plus a number of hand-written FreeBSD-specific ones. Hopefully those can eventually be cleaned up and sent upstream too. MFC after: 1 week X-MFC-With: r263313
60 lines
2.9 KiB
Diff
60 lines
2.9 KiB
Diff
Pull in r198918 from upstream clang trunk (by Jakob Stoklund Olesen):
|
|
|
|
Locate GCC installations on SPARC systems.
|
|
|
|
Introduced here: http://svn.freebsd.org/changeset/base/262262
|
|
|
|
Index: tools/clang/lib/Driver/ToolChains.cpp
|
|
===================================================================
|
|
--- tools/clang/lib/Driver/ToolChains.cpp
|
|
+++ tools/clang/lib/Driver/ToolChains.cpp
|
|
@@ -1164,6 +1164,13 @@ void Generic_GCC::GCCInstallationDetector::print(r
|
|
"powerpc64le-suse-linux",
|
|
"ppc64le-redhat-linux" };
|
|
|
|
+ static const char *const SPARCv8LibDirs[] = { "/lib32", "/lib" };
|
|
+ static const char *const SPARCv8Triples[] = { "sparc-linux-gnu",
|
|
+ "sparcv8-linux-gnu" };
|
|
+ static const char *const SPARCv9LibDirs[] = { "/lib64", "/lib" };
|
|
+ static const char *const SPARCv9Triples[] = { "sparc64-linux-gnu",
|
|
+ "sparcv9-linux-gnu" };
|
|
+
|
|
static const char *const SystemZLibDirs[] = { "/lib64", "/lib" };
|
|
static const char *const SystemZTriples[] = {
|
|
"s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
|
|
@@ -1283,6 +1290,26 @@ void Generic_GCC::GCCInstallationDetector::print(r
|
|
TripleAliases.append(PPC64LETriples,
|
|
PPC64LETriples + llvm::array_lengthof(PPC64LETriples));
|
|
break;
|
|
+ case llvm::Triple::sparc:
|
|
+ LibDirs.append(SPARCv8LibDirs,
|
|
+ SPARCv8LibDirs + llvm::array_lengthof(SPARCv8LibDirs));
|
|
+ TripleAliases.append(SPARCv8Triples,
|
|
+ SPARCv8Triples + llvm::array_lengthof(SPARCv8Triples));
|
|
+ BiarchLibDirs.append(SPARCv9LibDirs,
|
|
+ SPARCv9LibDirs + llvm::array_lengthof(SPARCv9LibDirs));
|
|
+ BiarchTripleAliases.append(
|
|
+ SPARCv9Triples, SPARCv9Triples + llvm::array_lengthof(SPARCv9Triples));
|
|
+ break;
|
|
+ case llvm::Triple::sparcv9:
|
|
+ LibDirs.append(SPARCv9LibDirs,
|
|
+ SPARCv9LibDirs + llvm::array_lengthof(SPARCv9LibDirs));
|
|
+ TripleAliases.append(SPARCv9Triples,
|
|
+ SPARCv9Triples + llvm::array_lengthof(SPARCv9Triples));
|
|
+ BiarchLibDirs.append(SPARCv8LibDirs,
|
|
+ SPARCv8LibDirs + llvm::array_lengthof(SPARCv8LibDirs));
|
|
+ BiarchTripleAliases.append(
|
|
+ SPARCv8Triples, SPARCv8Triples + llvm::array_lengthof(SPARCv8Triples));
|
|
+ break;
|
|
case llvm::Triple::systemz:
|
|
LibDirs.append(SystemZLibDirs,
|
|
SystemZLibDirs + llvm::array_lengthof(SystemZLibDirs));
|
|
@@ -1379,6 +1406,7 @@ static bool findTargetBiarchSuffix(std::string &Su
|
|
Suffix = "/n32";
|
|
else if (TargetArch == llvm::Triple::x86_64 ||
|
|
TargetArch == llvm::Triple::ppc64 ||
|
|
+ TargetArch == llvm::Triple::sparcv9 ||
|
|
TargetArch == llvm::Triple::systemz ||
|
|
TargetArch == llvm::Triple::mips64 ||
|
|
TargetArch == llvm::Triple::mips64el)
|