X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=docs%2FCFEBuildInstrs.html;h=be844b9da895054c0f12190549a0acfc37b89735;hp=0367dd804d8ba65e778a4313c017ac48c5f895c3;hb=2998d3fde716816c1ac53675798af3bd5cf48fa8;hpb=83bd33a81423c799c4cfb368dc47a66809dd5a95 diff --git a/docs/CFEBuildInstrs.html b/docs/CFEBuildInstrs.html index 0367dd804d8..be844b9da89 100644 --- a/docs/CFEBuildInstrs.html +++ b/docs/CFEBuildInstrs.html @@ -3,23 +3,46 @@
-This document is intended to explain the process of building the LLVM -C/C++ front-end, based on GCC 3.4, from source.
+ + +Written by Brian R. Gaeke
+This document is intended to explain the process of building the +LLVM C/C++ front-end, based on GCC 3.4, from its source code. You +would have to do this, for example, if you are porting LLVM to a new +architecture or operating system.
NOTE: This is currently a somewhat fragile, error-prone -process, and you should only try to do it if (A) you really, really, -really can't use the binaries we distribute, and (B) you are a wicked -good GCC hacker.
+process, and you should only try to do it if: + +We welcome patches to help make this process simpler.
+Configure, build and install the C front-end:
+Configure, build, and install the C front-end:
+ ++Linux/x86: +
+% cd build - % ../src/configure --prefix=$CFEINSTALL --disable-nls --disable-shared \ + % ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls --disable-shared \ --enable-languages=c,c++ % gmake all-gcc % setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc % gmake all; gmake install-
Common Problem 1: You may get error messages regarding the fact +
+Solaris/Sparc: +
+ ++For Solaris/Sparc, LLVM only supports SparcV9. Therefore, the configure +command line should like something like this: +
+ ++ % cd build + % ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls --disable-shared \ + --enable-languages=c,c++ --host=sparcv9-sun-solaris2.8 + % gmake all-gcc + % setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc + % gmake all; gmake install ++ +
Common Problem: You may get error messages regarding the fact that LLVM does not support inline assembly. Here are two common fixes:
@@ -88,19 +134,31 @@ good GCC hacker. and apply a patch so that it does not use inline assembly.Common Problem 2: FIXME: Chris should add a section about - common problems porting to a new architecture, including changes you - might have to make to the gcc/gcc/config/name-of-cpu - directory. For example (expand these):
+Porting to a new architecture: If you are porting the new front-end + to a new architecture, or compiling in a different configuration that we have + previously, there are probably several changes you will have to make to the GCC + target to get it to work correctly. These include:
Test the newly-installed C frontend by one or more of the following means:
gmake -C
+ - compiling and running a "hello, LLVM" program in C and C++.
+ - running the tests under test/Programs using
gmake -C
test/Programs