From 4ba5e402dcf7a37ddbdd74312c9633d91ba0648f Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 26 Mar 2018 15:13:32 +0200 Subject: [PATCH] Abi: Fix switch statment when guessing ABI based on target triple Some entries were duplicated. Fix fallout in gcc toolchain test caused by this change. Change-Id: I63c7a5fdba93e903888b2daa99a87e0a07c28acd Reviewed-by: hjk --- src/plugins/projectexplorer/abi.cpp | 4 ++-- src/plugins/projectexplorer/gcctoolchain.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index a533cd81f7d..f1af19a6dc6 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -527,7 +527,7 @@ Abi Abi::abiFromTargetTriplet(const QString &triple) if (p == "unknown" || p == "pc" || p == "none" || p == "gnu" || p == "uclibc" || p == "86_64" || p == "redhat" - || p == "gnueabi" || p == "w64") { + || p == "w64") { continue; } else if (p == "i386" || p == "i486" || p == "i586" || p == "i686" || p == "x86") { @@ -591,7 +591,7 @@ Abi Abi::abiFromTargetTriplet(const QString &triple) width = 64; } else if (p == "darwin9") { width = 32; - } else if (p == "gnueabi") { + } else if (p == "gnueabi" || p == "elf") { format = ElfFormat; } else if (p == "wrs") { continue; diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 13714864ae6..98b7825d5b5 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1625,11 +1625,11 @@ void ProjectExplorerPlugin::testGccAbiGuessing_data() QTest::newRow("broken input -- 64bit") << QString::fromLatin1("arm-none-foo-gnueabi") << QByteArray("#define __SIZEOF_SIZE_T__ 8\n#define __Something\n") - << QStringList({"arm-unknown-unknown-unknown-64bit"}); + << QStringList({"arm-unknown-unknown-elf-64bit"}); QTest::newRow("broken input -- 32bit") << QString::fromLatin1("arm-none-foo-gnueabi") << QByteArray("#define __SIZEOF_SIZE_T__ 4\n#define __Something\n") - << QStringList({"arm-unknown-unknown-unknown-32bit"}); + << QStringList({"arm-unknown-unknown-elf-32bit"}); QTest::newRow("totally broken input -- 32bit") << QString::fromLatin1("foo-bar-foo") << QByteArray("#define __SIZEOF_SIZE_T__ 4\n#define __Something\n")