From c8bb4e0dd885c798105b68579991d53975cdf003 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh <andrewhsieh@google.com> Date: Mon, 8 Apr 2013 13:38:40 +0800 Subject: [PATCH 5/5] Fixed darwin ld.mcld GNU -m emulation fail GNU -m emulation doesn't provide OS. If ld.mcld is built on darwin the OS is incorrectly set to darwin. Force to "linux" for Android. Change-Id: Ibef002762582781f4eac5c587c28d04fbdd7e4da --- tools/llvm-mcld/llvm-mcld.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp index b5152e6..f7ddd90 100644 --- a/tools/llvm-mcld/llvm-mcld.cpp +++ b/tools/llvm-mcld/llvm-mcld.cpp @@ -1018,12 +1018,12 @@ static Triple ParseEmulation(const std::string& pEmulation) { Triple result = StringSwitch<Triple>(pEmulation) .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.8.1.3