Changeset 1078

Show
Ignore:
Timestamp:
08/09/07 03:34:56 (1 year ago)
Author:
robert
Message:

Updated all_of_gcc_during_lfs hint

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/all_of_gcc_during_lfs.txt

    r1034 r1078  
    11AUTHOR: Randy McMurchy <randy_at_linuxfromscratch_dot_org> 
    22 
    3 DATE: 2006-05-18 
     3DATE: 2007-07-01 
    44 
    55LICENSE: Creative Commons Attribution-NonCommercial-ShareAlike License 
     
    1010DESCRIPTION: This hint will guide you through the installation of any or all 
    1111the GCC compilers while building an LFS system. These instructions target 
    12 the 4.0.x series of GCC as there have been significant changes since the 
     12the 4.x.x series of GCC as there have been significant changes since the 
    13133.x.x series. Prior to the 4.x.x series, only the Ada compiler could not be 
    1414installed during Chapter 6 of an LFS build. See my 
     
    2222 
    23231. The GCC tarball for whatever version of GCC called for in LFS. This will 
    24 be a file named something similar to gcc-4.0.3.tar.bz2 
    25  
    26 2. http://anduin.linuxfromscratch.org/sources/BLFS/svn/g/gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.bz2 
     24be a file named something similar to gcc-4.1.2.tar.bz2 
     25 
     262. The 2005 version of the GNAT compiler found on the AdaCore site. The 
     27download location (https://libre.adacore.com/dynamic/download_page) requires 
     28that you create an account on the AdaCore site before you can download the 
     29package. Nothing is required other than a valid email address. Ensure you 
     30download the 2005 version of the GNAT compiler. The 2006 version will not work. 
     31The file name you need is: gnat-gpl-2005-i686-gnu-linux-gnu-libc2.3-bin.tar.gz.  
    2732(not required if your host system has an existing Ada compiler, or you don't 
    2833plan on installing the GCC Ada compiler) 
    2934 
    30 3. A GMP tarball if you plan on installing the Fortran 95 compiler. See 
     353. A GMP tarball if you plan on installing the Fortran compiler. See 
    3136http://www.linuxfromscratch.org/blfs/view/svn/general/gmp.html for download 
    3237locations. 
    3338 
    34 4. An MPFR tarball if you plan on installing the Fortran 95 compiler. See 
     394. An MPFR tarball if you plan on installing the Fortran compiler. See 
    3540http://www.mpfr.org/mpfr-current/ for download locations. 
    3641 
     
    4752        1.  Introduction 
    4853        2.  The Treelang compiler 
    49         3.  The Fortran 95 compiler 
     54        3.  The Fortran compiler 
    5055              GMP installation 
    5156              MPFR installation 
     
    7277yourself, when I get to the GCC installation in Chapter 6 of LFS, I'll just 
    7378add additional compilers to the configure script command and I'll build them 
    74 then. This won't work for the Ada, Fortran 95 or Treelang compilers. For 
     79then. This won't work for the Ada, Fortran or Treelang compilers. For 
    7580these three compilers, you cannot wait until the GCC installation in Chapter 
    76 6 to decide you want/need to install them (Fortran 95 is a slight exception 
     816 to decide you want/need to install them (Fortran is a slight exception 
    7782to this). At this point of Chapter 6, you are in a chroot environment 
    7883working with whatever is installed in the /tools directory you created in 
     
    8085to compile Ada and Treelang. 
    8186 
    82 In summary, if you need to install the Ada, Fortran 95 or Treelang compilers 
     87In summary, if you need to install the Ada, Fortran or Treelang compilers 
    8388during Chapter 6 of an LFS build, you'll need to do some extra work. The 
    8489Java and Objective C compilers can be installed by simply adding them to the 
     
    95100========================= 
    96101 
    97 Note that this information about the Treelang compiler has not been tested, 
    98 but I feel it should work. In my most recent build of GCC during LFS, 
    99 Treelang failed to build, and I just didn't have it in me to start over. The 
    100 fix seems so trivial, and I don't need the Treelang compiler, so I just 
    101 moved on. 
    102  
    103102You probably don't need the Treelang compiler. It is only good for 
    104103developers who are developing a new compiler for GCC. However, if you wish 
    105 to build it during a build of LFS, simply install the Flex package at the 
    106 end of Chapter 5 of LFS. Best I could tell, Treelang failed to build for me 
    107 because Flex wasn't available at the point where you install GCC in Chapter 
    108 6. 
    109  
    110 I might have been able to build Flex before GCC in Chapter 6, but it simply 
    111 wasn't worth trying. Before GCC is installed in Chapter 6, you're still 
    112 using the GCC built in Chapter 5, and things are somewhat wierd at this 
    113 point. More on this in the Fortran 95 section. 
    114  
    115 Anyway, install Flex at the end of Chapter 5 while building LFS and Treelang 
    116 will probably build okay in Chapter 6. Instructions for installing Flex can 
    117 be found in Chapter 6 of the LFS book. 
    118  
    119 ========================== 
    120 3. THE FORTRAN 95 COMPILER 
    121 ========================== 
     104to build it during a build of LFS, you'll need to install the Bison and Flex 
     105packages before starting the Chapter 6 build of GCC. 
     106 
     107======================== 
     1083. THE FORTRAN COMPILER: 
     109======================== 
    122110 
    123111Starting with version 4.x.x of GCC, there is no longer support for the 
     
    141129---------------- 
    142130 
    143 The BLFS book shows to use these two parameters passed to the configure 
    144 script: --enable-cxx and --enable-mpbsd. This will not work at this point of 
    145 Chapter 6. I didn't test using just the --enable-mpbsd alone, so it may or 
    146 may not work here. For certain, you cannot use the --enable-cxx parameter as 
    147 configure will bitch loudly about a C++ compiler not being available. Even 
    148 though C++ was installed in Chapter 5, at this point of Chapter 6 the 
    149 toolchain has already been readjusted. Apparently, this makes the Autotools 
    150 look for dependencies in /usr instead of /tools. So, don't use --enable-cxx 
    151 when building GMP (as mentioned, I also left off --enable-mpbsd) and things 
    152 should be fine. 
     131In order to build the GMP C++ extension library (by passing --enable-cxx 
     132parameter to configure), you'll need to fake an installation of the libstdc++ 
     133library in /usr/lib of the new LFS partition. Issue the two commands below 
     134before building the GMP package to provide temporary symlinks to the library 
     135in the /tools/lib directory: 
     136 
     137ln -v -s /tools/lib/libstdc++.so.6 /usr/lib 
     138ln -v -s /tools/lib/libstdc++.so   /usr/lib 
     139 
     140Additionally, you'll need to install the M4 package at the end of Chapter 5 
     141or before the GMP installation in Chapter 6. You can use the existing LFS 
     142Chapter 6 instructions for installing the M4 package. 
    153143 
    154144----------------- 
     
    174164---------------- 
    175165 
    176 At this point (GMP and MPFR installations complete), you can add the f95 
     166At this point (GMP and MPFR installations complete), you can add the fortran 
    177167language to the --enable-languages switch on GCC's configure and expect it 
    178168to successfully build Fortran 95. However, you also need to add a couple 
     
    196186        --with-mpfr=/usr \ 
    197187        --with-gmp=/usr \ 
    198         --enable-languages=c,c++,objc,f95,ada,java 
     188        --enable-languages=c,c++,objc,fortran,ada,java,treelang 
    199189 
    200190==================== 
     
    229219Here's the simple installation procedure for the GNAT Ada compiler: 
    230220 
    231 1. Download the tarball: 
    232  
    233 http://anduin.linuxfromscratch.org/sources/BLFS/svn/g/gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.bz2 
    234  
    235 2. Issue the following commands to unpack the tarball and change directories 
    236 into the root of the source tree: 
    237  
    238 tar xf gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz 
    239 cd gnat-3.15p-i686-pc-linux-gnu-bin 
     2211. Download the tarball from the Adacore site. 
     222 
     2232. Unpack the tarball and change directories into the root of the source tree. 
    240224 
    2412253. Issue the following command to install the GNAT compiler: 
     
    244228 
    245229You should check and ensure that the /tools/gnat directory was created and 
    246 populated with files. The GNAT source tree can be removed. 
     230populated with files. The GNAT source tree can then be removed. 
    247231 
    248232================================= 
     
    3563403. After the "make install" step, issue the following command: 
    357341 
    358 chown -v -R root:root /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/adainclude 
     342chown -v -R root:root /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/adainclude 
     343(modify the GCC version number in the path shown above) 
    359344 
    360345Except for the changes shown above, follow the commands as outlined in the 
     
    381366adventure. 
    382367 
     368 
    383369ACKNOWLEDGEMENTS: 
    384370 
     
    386372* The LFS community for creating and maintaining such a cool project. 
    387373 
     374 
    388375CHANGELOG: 
    389376 
    390 [2005-03-12] 
    391     * Original draft 
    392  
    393 [2005-03-13] 
    394     * Added instructions to change the ownership of the Ada interface header  
    395       include files to root 
    396  
    397 [2005-03-14] 
    398     * Fixed typo 
    399     * Modified the Chapter 5 instructions to not use forced static build 
     377[2007-07-01] 
     378    * Updated the Gnat download instructions 
     379    * Updated the requirements to install the 'treelang' language 
     380    * Updated the GMP installation instructions 
     381 
     382[2006-05-18] 
     383    * Changed the GNAT installation to use the existing Makefile, which 
     384      eliminates the need to install Tcsh. 
    400385 
    401386[2006-05-03] 
     
    404389      the Ada compiler. 
    405390 
    406 [2006-05-18] 
    407     * Changed the GNAT installation to use the existing Makefile, which 
    408       eliminates the need to install Tcsh. 
    409  
     391[2005-03-14] 
     392    * Fixed typo 
     393    * Modified the Chapter 5 instructions to not use forced static build 
     394 
     395[2005-03-13] 
     396    * Added instructions to change the ownership of the Ada interface header  
     397      include files to root 
     398 
     399[2005-03-12] 
     400    * Original draft 
     401