[LLVMdev] LLVM porting Plan9 (probably stupid question)

Jens Staal staal1978 at gmail.com
Tue Feb 23 01:40:14 PST 2010

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.

 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).

 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?


“How portable is LLVM?” - depends on unix shell + sed



LLVM translate C++ to C



Clang can now compile LLVM/Clang



APE/Psh : provides a Ksh-compatible shell + sed, Pcc POSIX compatible C

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100223/24731b21/attachment.html>

More information about the llvm-dev mailing list