From 453d37f5244ab5763b9406a86a13e484354b4a4c Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Mon, 14 Apr 2014 11:14:14 -0700 Subject: [PATCH 1/3] Fixed darwin ld.mcld GNU -m emulation fail Change-Id: Ibdddad13aca0d2986755d7390ca6aa9b364e3528 --- tools/lite/lib/TripleOptions.cpp | 4 ++-- tools/mcld/main.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/lite/lib/TripleOptions.cpp b/tools/lite/lib/TripleOptions.cpp index bf37b01..f360c27 100644 --- a/tools/lite/lib/TripleOptions.cpp +++ b/tools/lite/lib/TripleOptions.cpp @@ -86,12 +86,12 @@ ParseEmulation(llvm::Triple& pTriple, const std::string& pEmulation) llvm::Triple triple = llvm::StringSwitch(pEmulation) .Case("aarch64linux", llvm::Triple("aarch64", "", "linux", "gnu")) .Case("armelf_linux_eabi", llvm::Triple("arm", "", "linux", "gnueabi")) - .Case("elf_i386", llvm::Triple("i386", "", "", "gnu")) + .Case("elf_i386", llvm::Triple("i386", "", "linux", "gnu")) .Case("elf_x86_64", llvm::Triple("x86_64", "", "", "gnu")) .Case("elf32_x86_64", llvm::Triple("x86_64", "", "", "gnux32")) .Case("elf_i386_fbsd", llvm::Triple("i386", "", "freebsd", "gnu")) .Case("elf_x86_64_fbsd", llvm::Triple("x86_64", "", "freebsd", "gnu")) - .Case("elf32ltsmip", llvm::Triple("mipsel", "", "", "gnu")) + .Case("elf32ltsmip", llvm::Triple("mipsel", "", "linux", "gnu")) .Default(llvm::Triple()); if (triple.getArch() == llvm::Triple::UnknownArch && diff --git a/tools/mcld/main.cpp b/tools/mcld/main.cpp index 97da737..6a28c91 100644 --- a/tools/mcld/main.cpp +++ b/tools/mcld/main.cpp @@ -1043,12 +1043,12 @@ static Triple ParseEmulation(const std::string& pEmulation) Triple result = StringSwitch(pEmulation) .Case("aarch64linux", Triple("aarch64", "", "linux", "gnu")) .Case("armelf_linux_eabi", Triple("arm", "", "linux", "gnueabi")) - .Case("elf_i386", Triple("i386", "", "", "gnu")) + .Case("elf_i386", Triple("i386", "", "linux", "gnu")) .Case("elf_x86_64", Triple("x86_64", "", "", "gnu")) .Case("elf32_x86_64", Triple("x86_64", "", "", "gnux32")) .Case("elf_i386_fbsd", Triple("i386", "", "freebsd", "gnu")) .Case("elf_x86_64_fbsd", Triple("x86_64", "", "freebsd", "gnu")) - .Case("elf32ltsmip", Triple("mipsel", "", "", "gnu")) + .Case("elf32ltsmip", Triple("mipsel", "", "linux", "gnu")) .Default(Triple()); if (result.getArch() == Triple::UnknownArch && -- 1.9.1.423.g4596e3a