Changeset 1078
- Timestamp:
- 08/09/07 03:34:56 (1 year ago)
- Files:
-
- trunk/all_of_gcc_during_lfs.txt (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/all_of_gcc_during_lfs.txt
r1034 r1078 1 1 AUTHOR: Randy McMurchy <randy_at_linuxfromscratch_dot_org> 2 2 3 DATE: 200 6-05-183 DATE: 2007-07-01 4 4 5 5 LICENSE: Creative Commons Attribution-NonCommercial-ShareAlike License … … 10 10 DESCRIPTION: This hint will guide you through the installation of any or all 11 11 the 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 the12 the 4.x.x series of GCC as there have been significant changes since the 13 13 3.x.x series. Prior to the 4.x.x series, only the Ada compiler could not be 14 14 installed during Chapter 6 of an LFS build. See my … … 22 22 23 23 1. 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 24 be a file named something similar to gcc-4.1.2.tar.bz2 25 26 2. The 2005 version of the GNAT compiler found on the AdaCore site. The 27 download location (https://libre.adacore.com/dynamic/download_page) requires 28 that you create an account on the AdaCore site before you can download the 29 package. Nothing is required other than a valid email address. Ensure you 30 download the 2005 version of the GNAT compiler. The 2006 version will not work. 31 The file name you need is: gnat-gpl-2005-i686-gnu-linux-gnu-libc2.3-bin.tar.gz. 27 32 (not required if your host system has an existing Ada compiler, or you don't 28 33 plan on installing the GCC Ada compiler) 29 34 30 3. A GMP tarball if you plan on installing the Fortran 95compiler. See35 3. A GMP tarball if you plan on installing the Fortran compiler. See 31 36 http://www.linuxfromscratch.org/blfs/view/svn/general/gmp.html for download 32 37 locations. 33 38 34 4. An MPFR tarball if you plan on installing the Fortran 95compiler. See39 4. An MPFR tarball if you plan on installing the Fortran compiler. See 35 40 http://www.mpfr.org/mpfr-current/ for download locations. 36 41 … … 47 52 1. Introduction 48 53 2. The Treelang compiler 49 3. The Fortran 95compiler54 3. The Fortran compiler 50 55 GMP installation 51 56 MPFR installation … … 72 77 yourself, when I get to the GCC installation in Chapter 6 of LFS, I'll just 73 78 add additional compilers to the configure script command and I'll build them 74 then. This won't work for the Ada, Fortran 95or Treelang compilers. For79 then. This won't work for the Ada, Fortran or Treelang compilers. For 75 80 these three compilers, you cannot wait until the GCC installation in Chapter 76 6 to decide you want/need to install them (Fortran 95is a slight exception81 6 to decide you want/need to install them (Fortran is a slight exception 77 82 to this). At this point of Chapter 6, you are in a chroot environment 78 83 working with whatever is installed in the /tools directory you created in … … 80 85 to compile Ada and Treelang. 81 86 82 In summary, if you need to install the Ada, Fortran 95or Treelang compilers87 In summary, if you need to install the Ada, Fortran or Treelang compilers 83 88 during Chapter 6 of an LFS build, you'll need to do some extra work. The 84 89 Java and Objective C compilers can be installed by simply adding them to the … … 95 100 ========================= 96 101 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. The100 fix seems so trivial, and I don't need the Treelang compiler, so I just101 moved on.102 103 102 You probably don't need the Treelang compiler. It is only good for 104 103 developers 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 ========================== 104 to build it during a build of LFS, you'll need to install the Bison and Flex 105 packages before starting the Chapter 6 build of GCC. 106 107 ======================== 108 3. THE FORTRAN COMPILER: 109 ======================== 122 110 123 111 Starting with version 4.x.x of GCC, there is no longer support for the … … 141 129 ---------------- 142 130 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. 131 In order to build the GMP C++ extension library (by passing --enable-cxx 132 parameter to configure), you'll need to fake an installation of the libstdc++ 133 library in /usr/lib of the new LFS partition. Issue the two commands below 134 before building the GMP package to provide temporary symlinks to the library 135 in the /tools/lib directory: 136 137 ln -v -s /tools/lib/libstdc++.so.6 /usr/lib 138 ln -v -s /tools/lib/libstdc++.so /usr/lib 139 140 Additionally, you'll need to install the M4 package at the end of Chapter 5 141 or before the GMP installation in Chapter 6. You can use the existing LFS 142 Chapter 6 instructions for installing the M4 package. 153 143 154 144 ----------------- … … 174 164 ---------------- 175 165 176 At this point (GMP and MPFR installations complete), you can add the f 95166 At this point (GMP and MPFR installations complete), you can add the fortran 177 167 language to the --enable-languages switch on GCC's configure and expect it 178 168 to successfully build Fortran 95. However, you also need to add a couple … … 196 186 --with-mpfr=/usr \ 197 187 --with-gmp=/usr \ 198 --enable-languages=c,c++,objc,f 95,ada,java188 --enable-languages=c,c++,objc,fortran,ada,java,treelang 199 189 200 190 ==================== … … 229 219 Here's the simple installation procedure for the GNAT Ada compiler: 230 220 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 221 1. Download the tarball from the Adacore site. 222 223 2. Unpack the tarball and change directories into the root of the source tree. 240 224 241 225 3. Issue the following command to install the GNAT compiler: … … 244 228 245 229 You should check and ensure that the /tools/gnat directory was created and 246 populated with files. The GNAT source tree can be removed.230 populated with files. The GNAT source tree can then be removed. 247 231 248 232 ================================= … … 356 340 3. After the "make install" step, issue the following command: 357 341 358 chown -v -R root:root /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/adainclude 342 chown -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) 359 344 360 345 Except for the changes shown above, follow the commands as outlined in the … … 381 366 adventure. 382 367 368 383 369 ACKNOWLEDGEMENTS: 384 370 … … 386 372 * The LFS community for creating and maintaining such a cool project. 387 373 374 388 375 CHANGELOG: 389 376 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. 400 385 401 386 [2006-05-03] … … 404 389 the Ada compiler. 405 390 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
