summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Gnu.cpp
diff options
context:
space:
mode:
authorAaron Puchert <aaronpuchert@alice-dsl.net>2019-11-23 16:00:36 +0100
committerAaron Puchert <aaronpuchert@alice-dsl.net>2019-11-23 16:00:53 +0100
commit0010ea4224c7ff6b5aebeecacf10a7ced7d390b7 (patch)
tree21655e2a2cbc7f989ad5c08a9c2635a2197bebdf /clang/lib/Driver/ToolChains/Gnu.cpp
parent0e02977b6e64810bdf9265260a39d80fda031aa3 (diff)
downloadbcm5719-llvm-0010ea4224c7ff6b5aebeecacf10a7ced7d390b7.tar.gz
bcm5719-llvm-0010ea4224c7ff6b5aebeecacf10a7ced7d390b7.zip
[Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux
Summary: On SUSE distributions for 32-bit PowerPC, gcc is configured as a 64-bit compiler using the GNU triplet "powerpc64-suse-linux", but invoked with "-m32" by default. Thus, the correct GNU triplet for 32-bit PowerPC SUSE distributions is "powerpc64-suse-linux" and not "powerpc-suse-linux". Reviewers: jrtc27, nemanjai, glaubitz Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D55326
Diffstat (limited to 'clang/lib/Driver/ToolChains/Gnu.cpp')
-rw-r--r--clang/lib/Driver/ToolChains/Gnu.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index eb84a99a16b..4c6956d54b7 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2057,7 +2057,9 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
static const char *const PPCTriples[] = {
"powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
- "powerpc-suse-linux", "powerpc-montavista-linuxspe"};
+ // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a
+ // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux".
+ "powerpc64-suse-linux", "powerpc-montavista-linuxspe"};
static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
static const char *const PPC64Triples[] = {
"powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu",
OpenPOWER on IntegriCloud