1 From 453d37f5244ab5763b9406a86a13e484354b4a4c Mon Sep 17 00:00:00 2001 2 From: Andrew Hsieh <andrewhsieh (a] google.com> 3 Date: Mon, 14 Apr 2014 11:14:14 -0700 4 Subject: [PATCH 1/3] Fixed darwin ld.mcld GNU -m emulation fail 5 6 Change-Id: Ibdddad13aca0d2986755d7390ca6aa9b364e3528 7 --- 8 tools/lite/lib/TripleOptions.cpp | 4 ++-- 9 tools/mcld/main.cpp | 4 ++-- 10 2 files changed, 4 insertions(+), 4 deletions(-) 11 12 diff --git a/tools/lite/lib/TripleOptions.cpp b/tools/lite/lib/TripleOptions.cpp 13 index bf37b01..f360c27 100644 14 --- a/tools/lite/lib/TripleOptions.cpp 15 +++ b/tools/lite/lib/TripleOptions.cpp 16 @@ -86,12 +86,12 @@ ParseEmulation(llvm::Triple& pTriple, const std::string& pEmulation) 17 llvm::Triple triple = llvm::StringSwitch<llvm::Triple>(pEmulation) 18 .Case("aarch64linux", llvm::Triple("aarch64", "", "linux", "gnu")) 19 .Case("armelf_linux_eabi", llvm::Triple("arm", "", "linux", "gnueabi")) 20 - .Case("elf_i386", llvm::Triple("i386", "", "", "gnu")) 21 + .Case("elf_i386", llvm::Triple("i386", "", "linux", "gnu")) 22 .Case("elf_x86_64", llvm::Triple("x86_64", "", "", "gnu")) 23 .Case("elf32_x86_64", llvm::Triple("x86_64", "", "", "gnux32")) 24 .Case("elf_i386_fbsd", llvm::Triple("i386", "", "freebsd", "gnu")) 25 .Case("elf_x86_64_fbsd", llvm::Triple("x86_64", "", "freebsd", "gnu")) 26 - .Case("elf32ltsmip", llvm::Triple("mipsel", "", "", "gnu")) 27 + .Case("elf32ltsmip", llvm::Triple("mipsel", "", "linux", "gnu")) 28 .Default(llvm::Triple()); 29 30 if (triple.getArch() == llvm::Triple::UnknownArch && 31 diff --git a/tools/mcld/main.cpp b/tools/mcld/main.cpp 32 index 97da737..6a28c91 100644 33 --- a/tools/mcld/main.cpp 34 +++ b/tools/mcld/main.cpp 35 @@ -1043,12 +1043,12 @@ static Triple ParseEmulation(const std::string& pEmulation) 36 Triple result = StringSwitch<Triple>(pEmulation) 37 .Case("aarch64linux", Triple("aarch64", "", "linux", "gnu")) 38 .Case("armelf_linux_eabi", Triple("arm", "", "linux", "gnueabi")) 39 - .Case("elf_i386", Triple("i386", "", "", "gnu")) 40 + .Case("elf_i386", Triple("i386", "", "linux", "gnu")) 41 .Case("elf_x86_64", Triple("x86_64", "", "", "gnu")) 42 .Case("elf32_x86_64", Triple("x86_64", "", "", "gnux32")) 43 .Case("elf_i386_fbsd", Triple("i386", "", "freebsd", "gnu")) 44 .Case("elf_x86_64_fbsd", Triple("x86_64", "", "freebsd", "gnu")) 45 - .Case("elf32ltsmip", Triple("mipsel", "", "", "gnu")) 46 + .Case("elf32ltsmip", Triple("mipsel", "", "linux", "gnu")) 47 .Default(Triple()); 48 49 if (result.getArch() == Triple::UnknownArch && 50 -- 51 1.9.1.423.g4596e3a 52 53