• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From c8bb4e0dd885c798105b68579991d53975cdf003 Mon Sep 17 00:00:00 2001
2From: Andrew Hsieh <andrewhsieh@google.com>
3Date: Mon, 8 Apr 2013 13:38:40 +0800
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: Ibef002762582781f4eac5c587c28d04fbdd7e4da
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 b5152e6..f7ddd90 100644
16--- a/tools/llvm-mcld/llvm-mcld.cpp
17+++ b/tools/llvm-mcld/llvm-mcld.cpp
18@@ -1018,12 +1018,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