1From a414ed878190c6fc68f0b1362223558130c0fca6 Mon Sep 17 00:00:00 2001 2From: Andrew Hsieh <andrewhsieh@google.com> 3Date: Tue, 19 Mar 2013 10:42:09 -0700 4Subject: [PATCH 5/5] Fixed darwin ld.mcld GNU -m emulation fail 5 6GNU -m emulation doesn't provide OS. If ld.mcld is built on darwin 7the OS is incorrectly set to darwin. Force to "linux" for Android. 8 9Change-Id: Ibb394fc90f938247643f4b7ef8c02460bd175e9e 10--- 11 tools/llvm-mcld/llvm-mcld.cpp | 4 ++-- 12 1 file changed, 2 insertions(+), 2 deletions(-) 13 14diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp 15index 207f4bb..49fe328 100644 16--- a/tools/llvm-mcld/llvm-mcld.cpp 17+++ b/tools/llvm-mcld/llvm-mcld.cpp 18@@ -991,12 +991,12 @@ static Triple ParseEmulation(const std::string& pEmulation) 19 { 20 Triple result = StringSwitch<Triple>(pEmulation) 21 .Case("armelf_linux_eabi", Triple("arm", "", "linux", "gnueabi")) 22- .Case("elf_i386", Triple("i386", "", "", "gnu")) 23+ .Case("elf_i386", Triple("i386", "", "linux", "gnu")) 24 .Case("elf_x86_64", Triple("x86_64", "", "", "gnu")) 25 .Case("elf32_x86_64", Triple("x86_64", "", "", "gnux32")) 26 .Case("elf_i386_fbsd", Triple("i386", "", "freebsd", "gnu")) 27 .Case("elf_x86_64_fbsd", Triple("x86_64", "", "freebsd", "gnu")) 28- .Case("elf32ltsmip", Triple("mipsel", "", "", "gnu")) 29+ .Case("elf32ltsmip", Triple("mipsel", "", "linux", "gnu")) 30 .Default(Triple()); 31 32 if (result.getArch() == Triple::UnknownArch && 33-- 341.8.1.3 35 36