Thanks.  Committed as r168310 with following change:<div><br></div><div><div><div>+  // According to Android ABI, we have to link with libdl if we are</div><div>+  // linking with non-static libgcc.</div><div>+  //</div><div>
+  // NOTE: This fixes a link error on Android MIPS as well.  The non-static</div><div>+  // libgcc for MIPS relies on _Unwind_Find_FDE and dl_iterate_phdr from libdl.</div><div>+  if (isAndroid && !StaticLibgcc)</div>
<div>+    CmdArgs.push_back("-ldl");</div></div></div><div><br></div><div>Thanks for your help.</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 7:02 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">LGTM with the following tweak:<br>
<br>
+  if (!StaticLibgcc && isAndroid)<br>
+    CmdArgs.push_back("-ldl");<br>
<br>
I would start with the 'isAndroid' condition just to make it more<br>
clear that this is an android-specific hack. I would also add a<br>
comment similar to your original email. It is really important to<br>
document this type of surprising constraint in the source, not just in<br>
the email. ;]<br>
</blockquote></div><br></div>