<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5">
<div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div><div><br></div></div>I'm not asking you to wrap the driver.  I'm asking you to change clang's driver logic when targeting *-*-nacl to use the existing logic to suppress builtin treatment of functions.</div>

</div></blockquote><div><br></div><div>Oh, it turns out Clang does not currently support -fno-builtin-<FUNC> at all: </div><div><a href="http://llvm.org/bugs/show_bug.cgi?id=4941" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=4941</a></div>

</div></div></div></blockquote><br></div></div></div><div>What functions do you want to opt out of builtin treatment?  All of them?  Just math functions?</div></div></blockquote><div><br></div><div>For starters, math functions. There aren't many libc math functions handled there, BTW. When I was working on the original patch I dug through history - a couple were added (pow and sqrt) I think, and sqrt was then backed off due to some problems. Even with pow there are other constrains such as errno (the builtin is not generated when we want errno, naturally, even without -fno-builtins). Perhaps I can make the target hook more generic - controlling all math libraries (the BIfoo ones, not BI__builtin_foo) instead of just pow?</div>
<div><br></div><div>Eli</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>