powerpc: update the build triplet
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Tue, 31 Jan 2017 11:49:17 +0000 (17:19 +0530)
committerNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Tue, 31 Jan 2017 11:51:11 +0000 (17:21 +0530)
The more commonly used triplet on ppc64le happens to be
powerpc64le-unknown-linux-gnu. The existing one causes problems in
certain build environments. Change this.

While at it, also include support for building on big endian.

Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
src/cc/frontends/clang/loader.cc

index bfd9f6a..241e7ff 100644 (file)
@@ -167,7 +167,11 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, unique_ptr<vector<TableDes
 
   // set up the command line argument wrapper
 #if defined(__powerpc64__)
-  driver::Driver drv("", "ppc64le-unknown-linux-gnu", diags);
+#if defined(_CALL_ELF) && _CALL_ELF == 2
+  driver::Driver drv("", "powerpc64le-unknown-linux-gnu", diags);
+#else
+  driver::Driver drv("", "powerpc64-unknown-linux-gnu", diags);
+#endif
 #elif defined(__aarch64__)
   driver::Driver drv("", "aarch64-unknown-linux-gnu", diags);
 #else