<div dir="ltr">On Ubuntu 16.04 I just did:<div><br></div><div>nm -D -u /usr/lib/llvm-3.8/bin/clang | grep -v llvm | grep -v LLVM | grep -v _Z<br></div><div><br></div><div>I got 53 results:</div><div><br></div><div><div>                 U abort</div><div>                 U asctime</div><div>                 U calloc</div><div>                 U chdir</div><div>                 U close</div><div>                 U ConvertUTF8toUTF16</div><div>                 U ConvertUTF8toUTF32</div><div>                 U __cxa_atexit</div><div>                 U __cxa_guard_acquire</div><div>                 U __cxa_guard_release</div><div>                 U __cxa_pure_virtual</div><div>                 U __errno_location</div><div>                 U exit</div><div>                 U __fprintf_chk</div><div>                 U free</div><div>                 U getenv</div><div>                 U getNumBytesForUTF8</div><div>                 U getuid</div><div>                 w __gmon_start__</div><div>                 U isLegalUTF8Sequence</div><div>                 w _ITM_deregisterTMCloneTable</div><div>                 w _ITM_registerTMCloneTable</div><div>                 w _Jv_RegisterClasses</div><div>                 U __libc_start_main</div><div>                 U localtime</div><div>                 U malloc</div><div>                 U memchr</div><div>                 U memcmp</div><div>                 U memcpy</div><div>                 U __memcpy_chk</div><div>                 U memmove</div><div>                 U memset</div><div>                 U __popcountdi2</div><div>                 U __printf_chk</div><div>                 w __pthread_key_create</div><div>                 U qsort</div><div>                 U realloc</div><div>                 U __realpath_chk</div><div>                 U __snprintf_chk</div><div>                 U __stack_chk_fail</div><div>                 U stderr</div><div>                 U strchr</div><div>                 U strcmp</div><div>                 U strdup</div><div>                 U strlen</div><div>                 U strncmp</div><div>                 U strpbrk</div><div>                 U strrchr</div><div>                 U strstr</div><div>                 U strtol</div><div>                 U strtoul</div><div>                 U time</div><div>                 U __xstat</div></div><div><br></div><div>Some of those are still provided in llvm itself (e.g. the UTF8 stuff) but most of the rest are dead standard C library things -- not even POSIX. Without thinking about it too much, the least portable and hardest to fake look like time, localtime, and getuid. Which means: not very hard.</div><div><br></div><div>Build system is another matter entirely...</div><div><br></div><div>That's clang, but I don't expect an optimizer to be very system dependent :-)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 12, 2016 at 9:42 AM, Robinson, Paul via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
> -----Original Message-----<br>
> From: llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org">llvm-dev-bounces@<wbr>lists.llvm.org</a>] On Behalf Of Dee<br>
> Sharpe via llvm-dev<br>
> Sent: Tuesday, October 11, 2016 8:23 AM<br>
> To: <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> Subject: [llvm-dev] Port to other Operating Systems<br>
><br>
> Hello all,<br>
><br>
> Pardon me if this has already been covered elsewhere, however I have not<br>
> been able to find such documentation. Is there a consolidated set of<br>
> documentation that clearly explains what's necessary to port LLVM to other<br>
> OSes & how to add support for building executables (& libraries) for those<br>
> OSes? I'm searching through the source in an attempt to understand what<br>
> needs to be done, but this codebase isn't the most simple of codebases.<br>
> Thanks for any potential help!<br>
<br>
</span>I assume you are interested in hosts (not targets).  I'm not aware of any<br>
documentation per se.  If your host OS is not Unix-like or Windows-like,<br>
it will probably take some doing.  The first hurdle I can imagine is just<br>
getting the build system to work for you; we use CMake, which might or<br>
might not support your OS out of the box.  After that you'd likely need<br>
to do some work in the source itself; we try to isolate much of the<br>
platform-dependent stuff in llvm/lib/Support but I think there are some<br>
other places scattered around that are still under conditional compilation.<br>
<br>
+John Reagan who is point man for a project to (ultimately) bootstrap<br>
Clang for OpenVMS.  He might have a better idea what's needed, although<br>
last I talked to him they were going to use cross-compilation for quite<br>
some time.<br>
<br>
Hope this helps,<br>
--paulr<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Regards,<br>
> Apollo D. Sharpe, Sr.<br>
> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div>