<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I can confirm that musl builds and works correctly with clang/llvm.
We are using musl as a libc for our architecture.<br>
It has a much smaller code footprint than newlib or glibc.<br>
<br>
Regards,<br>
<br>
Richard<br>
<br>
<br>
<div class="moz-cite-prefix">On 3/11/2015 4:24 PM, Chao Yan wrote:<br>
</div>
<blockquote
cite="mid:CALxA4=CChYFk2fT7aeS8zvh6fdWoCrP_7=RQQVP0BK9D=5-yZQ@mail.gmail.com"
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">
<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">FWIW,
I build baremetal newlib for arm-eabi using clang, and
it works. I had to patch a few of the
__attribute__((naked)) functions because they were using
pre-UAL asm syntax, but for the most part it "just
works".<br>
</blockquote>
</blockquote>
<div><br>
</div>
<div>I build the baremetal newlib using arm-none-eabi-gcc as
well, but after linking with the hello world program, it
failed to run on both qemu-arm and gem5.</div>
<div><br>
</div>
<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"><span
class="">
<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"><br>
<br>
</blockquote>
</span>
Have you considered trying musl? It's supposed to be a
full replacement for glibc.</blockquote>
<div><br>
</div>
<div>It looks like a nice alternative, I'll certainly look
into it right away.</div>
<div><br>
</div>
<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"> </blockquote>
<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"><span
class="">
<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"><br>
</blockquote>
</span>
Have you run it in a debugger to figure out *why* it is
segfaulting? Have you tried building it without your
special pass?<br>
<br>
</blockquote>
<div>Well, I didn't try clang, I use arm-none-eabi-gcc to
build the newlib and the hello world program. The
arm-none-eabi-gdb says "Don't know how to run. Try "help
target"."</div>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</body>
</html>