Home | History | Annotate | Download | only in mclinker
      1 From a414ed878190c6fc68f0b1362223558130c0fca6 Mon Sep 17 00:00:00 2001
      2 From: Andrew Hsieh <andrewhsieh (a] google.com>
      3 Date: Tue, 19 Mar 2013 10:42:09 -0700
      4 Subject: [PATCH 5/5] Fixed darwin ld.mcld GNU -m emulation fail
      5 
      6 GNU -m emulation doesn't provide OS.  If ld.mcld is built on darwin
      7 the OS is incorrectly set to darwin.  Force to "linux" for Android.
      8 
      9 Change-Id: Ibb394fc90f938247643f4b7ef8c02460bd175e9e
     10 ---
     11  tools/llvm-mcld/llvm-mcld.cpp | 4 ++--
     12  1 file changed, 2 insertions(+), 2 deletions(-)
     13 
     14 diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp
     15 index 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 -- 
     34 1.8.1.3
     35 
     36