<p style="margin-bottom: 0in">I am not sure whether this would work
or if there are other limitations that would block this very
simplistic porting strategy to work. Since it looks so easy on paper,
I expect it to be more complicated otherwise it would probably
already have been done. 
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">According to the LLVM FAQ the important
dependencies for LLVM are a unix-type shell and sed [1], but those
dependencies are provided by APE [4]. (according the the Plan9
mailing list there are issues with C++ and how that has to be handled
by the kernel, but I do not understand exactly what the problem is).
(I have not tried yet because the only plan9 environment I have right
now is 9vx, which is not ideal).</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">Since LLVM is able to convert C++ to C
[2] (with “ugly” result), perhaps it would be possible to first
convert the LLVM/Clang code to C on a different host (BSD or Linux)
and then compile the resulting code (after some compatibility changes
in header libraries or other code?) with Pcc under APE on Plan9.
Since LLVM/Clang now can compile itself [3], if this would work, the
following iterations of compiling LLVM/Clang under Plan9/APE could be
done directly from the C++ code?</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">[1]</p>
<p style="margin-bottom: 0in">“How portable is LLVM?” - depends
on unix shell + sed</p>
<p style="margin-bottom: 0in"><a href="http://llvm.org/releases/2.0/docs/FAQ.html">http://llvm.org/releases/2.0/docs/FAQ.html</a></p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">[2]</p>
<p style="margin-bottom: 0in">LLVM translate C++ to C</p>
<p style="margin-bottom: 0in"><a href="http://llvm.org/releases/2.0/docs/FAQ.html#translatec">http://llvm.org/releases/2.0/docs/FAQ.html#translatec</a>++
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">[3]</p>
<p style="margin-bottom: 0in">Clang can now compile LLVM/Clang</p>
<p style="margin-bottom: 0in"><a href="http://blog.llvm.org/2010/02/clang-successfully-self-hosts.html">http://blog.llvm.org/2010/02/clang-successfully-self-hosts.html</a>
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">[4]</p>
<p style="margin-bottom: 0in">APE/Psh : provides a Ksh-compatible
shell + sed, Pcc POSIX compatible C compiler.</p>
<p style="margin-bottom: 0in"><a href="http://plan9.bell-labs.com/sys/doc/ape.html">http://plan9.bell-labs.com/sys/doc/ape.html</a>
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><br>
</p>