From 20dcb4c24dd245c25e4eae3dbb3762ab8dd4a4f7 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 13 Feb 2008 16:46:10 +0000 Subject: [PATCH] Add notes on Ada compilers that can be used for the build. Put all items that the user should specify in bold. Make it a debug build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47063 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CFEBuildInstrs.html | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/docs/CFEBuildInstrs.html b/docs/CFEBuildInstrs.html index b75c0a133fc..c9534095b66 100644 --- a/docs/CFEBuildInstrs.html +++ b/docs/CFEBuildInstrs.html @@ -92,14 +92,22 @@ top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example: systems without some work.

  • The build requires having a compiler that supports Ada, C and C++. The Ada front-end is written in Ada so an Ada compiler is needed to - build it. The LLVM parts of llvm-gcc are written in C++ so a C++ + build it. What is more, the Ada compiler must not be more recent + than what it is trying to compile, otherwise the build will fail. + This rules out gcc-4.3 (but not gcc-4.2) and also the + 2007 GNAT GPL Edition. + The LLVM parts of llvm-gcc are written in C++ so a C++ compiler is needed to build them. The rest of gcc is written in C. Some linux distributions provide a version of gcc that supports all three languages (the Ada part often comes as an add-on package to the rest of gcc). Otherwise it is possible to combine two versions - of gcc, one that supports Ada and C (such as - GNAT GPL Edition) and another - which supports C++, see below.

  • + of gcc, one that supports Ada and C (such as the + 2006 GNAT GPL Edition) + and another which supports C++, see below.

    +
  • Because the Ada front-end is experimental, it is wise to build the + compiler with checking enabled. This causes it to run slower, but + helps catch mistakes in the compiler (please report any problems using + LLVM bugzilla).

  • Supposing appropriate compilers are available, llvm-gcc with Ada support can @@ -153,21 +161,22 @@ cd llvm-objects

  • Configure LLVM (here it is configured to install into /usr/local):

    -
    ../llvm/configure --prefix=/usr/local
    +
    ../llvm/configure --prefix=/usr/local

    If you have a multi-compiler setup and the C++ compiler is not the default, then you can configure like this:

    -
    CXX=PATH_TO_C++_COMPILER ../llvm/configure --prefix=/usr/local
    +
    CXX=PATH_TO_C++_COMPILER ../llvm/configure --prefix=/usr/local
  • -
  • Build LLVM:

    +
  • Build LLVM with checking enabled (use ENABLE_OPTIMIZED=1 to + build without checking):

    -
    make
    +
    make ENABLE_OPTIMIZED=0
  • @@ -190,11 +199,13 @@ cd llvm-gcc-4.2-objects
  • Configure llvm-gcc (here it is configured to install into /usr/local). + The --enable-checking flag turns on sanity checks inside the compiler. + If you omit it then LLVM must be built with make ENABLE_OPTIMIZED=1. Additional languages can be appended to the --enable-languages switch, for example --enable-languages=ada,c,c++.

    -
    ../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib
    +
    ../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib

    If you have a multi-compiler setup, then you can configure like this:

    @@ -203,7 +214,7 @@ cd llvm-gcc-4.2-objects
     export CC=PATH_TO_C_AND_ADA_COMPILER
     export CXX=PATH_TO_C++_COMPILER
    -../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib
    +../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib