hints

[Prev] Thread [Next]  |  [Prev] Date [Next]

r1096 - trunk robert Mon Jan 05 03:06:44 2009

Author: robert
Date: 2009-01-04 21:01:46 -0700 (Sun, 04 Jan 2009)
New Revision: 1096

Modified:
   trunk/all_of_gcc_during_lfs.txt
Log:
reverting last change

Modified: trunk/all_of_gcc_during_lfs.txt
===================================================================
--- trunk/all_of_gcc_during_lfs.txt     2009-01-05 02:41:16 UTC (rev 1095)
+++ trunk/all_of_gcc_during_lfs.txt     2009-01-05 04:01:46 UTC (rev 1096)
@@ -1,10 +1,9 @@
-AUTHOR: William Immendorf <[EMAIL PROTECTED]>
+AUTHOR: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
 
-DATE: 2008-12-20
+DATE: 2007-07-01
 
-LICENSE: Creative Commons Attribution-Noncommercial-Share Alike 3.0
-United States License
-       http://creativecommons.org/licenses/by-nc-sa/3.0/us/
+LICENSE: Creative Commons Attribution-NonCommercial-ShareAlike License
+         http://creativecommons.org/licenses/by-nc-sa/1.0/
 
 SYNOPSIS: Installing all the GCC compilers while building LFS
 
@@ -12,32 +11,33 @@
 the GCC compilers while building an LFS system. These instructions target
 the 4.x.x series of GCC as there have been significant changes since the
 3.x.x series. Prior to the 4.x.x series, only the Ada compiler could not be
-installed during Chapter 6 of an LFS build. See Randy's
+installed during Chapter 6 of an LFS build. See my
 
http://www.linuxfromscratch.org/hints/downloads/files/ada_install_during_lfs.txt
 hint for instructions to install the Ada compiler during an LFS build if you
 are using a version of GCC prior to 4.x.x.
 
 ATTACHMENTS: None
 
-REQUIRED DOWNLOADS:
+REQUIRED DOWNLOADS: 
 
 1. The GCC tarball for whatever version of GCC called for in LFS. This will
-be a file named something similar to gcc-4.3.2.tar.bz2
+be a file named something similar to gcc-4.1.2.tar.bz2
 
 2. The 2005 version of the GNAT compiler found on the AdaCore site. The
 download location (https://libre.adacore.com/dynamic/download_page) requires
 that you create an account on the AdaCore site before you can download the
 package. Nothing is required other than a valid email address. Ensure you
 download the 2005 version of the GNAT compiler. The 2006 version will not work.
-The file name you need is: gnat-gpl-2005-i686-gnu-linux-gnu-libc2.3-bin.tar.gz.
+The file name you need is: 
gnat-gpl-2005-i686-gnu-linux-gnu-libc2.3-bin.tar.gz. 
 (not required if your host system has an existing Ada compiler, or you don't
 plan on installing the GCC Ada compiler)
 
-3. A Zip tarball if you are building the Java comp. See
-http://www.info-zip.org/Zip.html#Sources for download locations.
+3. A GMP tarball if you plan on installing the Fortran compiler. See
+http://www.linuxfromscratch.org/blfs/view/svn/general/gmp.html for download
+locations.
 
-4. An Unzip tarball if you are building the Java comp. See
-http://www.info-zip.org/UnZip.html#Downloads for download locations.
+4. An MPFR tarball if you plan on installing the Fortran compiler. See
+http://www.mpfr.org/mpfr-current/ for download locations.
 
 PREREQUISITES:
 
@@ -49,23 +49,23 @@
 CONTENTS:
 =========
 
-      1.  Introduction
-      2.  The Treelang compiler
-      3.  The Fortran compiler
-            GMP installation
-            MPFR installation
-            GCC installation
-      4.  The Ada compiler
-      5.  Package dependencies
-      6.  Installing the GNAT Ada compiler
-      7.  Configuring the PATH variable
-      8.  Chapter 5 GCC-Pass1 Modifications
-      9.  Reconfiguring the PATH variable
-      10. Chapter 5 GCC-Pass2 Modifications
-      11. Chapter 5 Ncurses modifications
-      12. Chapter 6 GCC Modifications
-      13. Chapter 6 Ncurses modifications
-      14. Closing
+        1.  Introduction
+        2.  The Treelang compiler
+        3.  The Fortran compiler
+              GMP installation
+              MPFR installation
+              GCC installation
+        4.  The Ada compiler
+        5.  Package dependencies
+        6.  Installing the GNAT Ada compiler
+        7.  Configuring the PATH variable
+        8.  Chapter 5 GCC-Pass1 Modifications
+        9.  Reconfiguring the PATH variable
+        10. Chapter 5 GCC-Pass2 Modifications
+        11. Chapter 5 Ncurses modifications
+        12. Chapter 6 GCC Modifications
+        13. Chapter 6 Ncurses modifications
+        14. Closing
 
 ================
 1. INTRODUCTION:
@@ -89,10 +89,10 @@
 Java and Objective C compilers can be installed by simply adding them to the
 list of compilers in the configure script parameter, --enable-languages=...
 
-In order to install the GCC Ada compiler, you must have an existing Ada
-compiler available so GCC can boostrap its version of Ada. If your host has
-an existing Ada compiler, you can omit some of this hint and simply use the
-updated Chapter 5 and Chapter 6 GCC installation instructions. More on this
+In order to install the GCC Ada compiler, you must have an existing Ada 
+compiler available so GCC can boostrap its version of Ada. If your host has 
+an existing Ada compiler, you can omit some of this hint and simply use the 
+updated Chapter 5 and Chapter 6 GCC installation instructions. More on this 
 in the appropriate sections later in the hint.
 
 =========================
@@ -104,21 +104,96 @@
 to build it during a build of LFS, you'll need to install the Bison and Flex
 packages before starting the Chapter 6 build of GCC.
 
-=========================
-3. THE JAVA COMPILER
-=========================
+========================
+3. THE FORTRAN COMPILER:
+========================
 
-gjar, a part of gcj, needs Zip and Unzip to build. Use BLFS
-instructions for both.
+Starting with version 4.x.x of GCC, there is no longer support for the
+Fortran 77 series of compilers. Fortran 95 is now included with GCC. In
+order to build the Fortran 95 compiler, the system must have the GMP and
+MPFR packages installed. See the "REQUIRED DOWNLOADS" section above for
+links to information about these packages.
 
+Installing these packages in Chapter 5 may end up producing undesireable
+results as GCC may look for bits of these packages later in a /tools
+directory which won't exist any longer. So, it is safer to install these
+packages in Chapter 6. Installation of packages is somewhat wierd before GCC
+is installed in Chapter 6, but using the extra parameters shown below seemed
+to get GMP, MPFR and Fortran 95 installed correctly.
 
+Both of these packages should be built after Binutils and before GCC in
+Chapter 6. GMP should be installed first.
+
+----------------
+GMP Installation
+----------------
+
+In order to build the GMP C++ extension library (by passing --enable-cxx
+parameter to configure), you'll need to fake an installation of the libstdc++
+library in /usr/lib of the new LFS partition. Issue the two commands below
+before building the GMP package to provide temporary symlinks to the library
+in the /tools/lib directory:
+
+ln -v -s /tools/lib/libstdc++.so.6 /usr/lib
+ln -v -s /tools/lib/libstdc++.so   /usr/lib
+
+Additionally, you'll need to install the M4 package at the end of Chapter 5
+or before the GMP installation in Chapter 6. You can use the existing LFS
+Chapter 6 instructions for installing the M4 package.
+
+-----------------
+MPFR Installation
+-----------------
+
+The installation of MPFR must also be slightly modified at this point for
+a good installation. I found that I had to add --with-gmp-include=/usr/include
+to the configure script so MPFR could find GMP's library interface header.
+Here are the commands I used to install MPFR:
+
+./configure --prefix=/usr \
+            --enable-thread-safe \
+            --enable-shared \
+            --with-gmp-include=/usr/include
+make
+make html
+make check
+make install
+
+----------------
+GCC Installation
+----------------
+
+At this point (GMP and MPFR installations complete), you can add the fortran
+language to the --enable-languages switch on GCC's configure and expect it
+to successfully build Fortran 95. However, you also need to add a couple
+more parameters to the configure script so that configure can find the two
+packages you just installed. I'm not certain, but apparently it must look
+in /tools for these packages, so parameters are added to configure to tell
+it to look in /usr. Add these two parameters to GCC's configure script:
+
+        --with-mpfr=/usr
+        --with-gmp=/usr
+
+The complete command I used to install all the compilers was:
+
+../gcc-4.0.3/configure \
+        --prefix=/usr \
+        --libexecdir=/usr/lib \
+        --enable-shared \
+        --enable-threads=posix \
+        --enable-__cxa_atexit \
+        --enable-clocale=gnu \
+        --with-mpfr=/usr \
+        --with-gmp=/usr \
+        --enable-languages=c,c++,objc,fortran,ada,java,treelang
+
 ====================
 4. THE ADA COMPILER:
 ====================
 
 Starting with version 4.x.x of GCC, the Ada installation is simpler, but it
 still requires an initial boostrap using an existing Ada compiler. If you
-have an Ada compiler on the host system you're building LFS on, there
+have an Ada compiler on the host system you're building LFS on, there 
 isn't much required before you can just build GCC.
 
 ========================
@@ -129,7 +204,7 @@
 host system, you won't need to install the GNAT binary Ada compiler. You can
 skip to step 7 and configure your path.
 
-If you don't have an existing Ada compiler, you'll need to install the GNAT
+If you don't have an existing Ada compiler, you'll need to install the GNAT 
 binary version available from the URL shown in the "REQUIRED DOWNLOADS"
 section at the beginning of the hint.
 
@@ -137,8 +212,8 @@
 6. INSTALLING THE GNAT ADA COMPILER:
 ====================================
 
-You'll need to install the GNAT Ada compiler before starting the Chapter 5
-GCC-Pass1 instructions in the LFS book. This is right after the Binutils-Pass1
+You'll need to install the GNAT Ada compiler before starting the Chapter 5 
+GCC-Pass1 instructions in the LFS book. This is right after the Binutils-Pass1 
 installation.
 
 Here's the simple installation procedure for the GNAT Ada compiler:
@@ -158,7 +233,7 @@
 7. CONFIGURING THE PATH VARIABLE:
 =================================
 
-You'll need to modify the PATH variable so that the newly installed GNAT
+You'll need to modify the PATH variable so that the newly installed GNAT 
 compiler is used to bootstrap GCC. Issue the following commands:
 
 PATH_HOLD=$PATH
@@ -172,7 +247,7 @@
 
 which gcc
 
-NOTE: if you're using an existing Ada compiler from your host, make the
+NOTE: if you're using an existing Ada compiler from your host, make the 
 appropriate substitutions above so this compiler is invoked by the 'gcc'
 command.
 
@@ -222,8 +297,8 @@
 
 There's some changes required to the Chapter 5 installation of GCC-Pass2.
 
-1. You'll need to unpack the gcc-ada tarball along with the gcc-core and
-gcc-g++ tarballs so the GCC Ada sources are available. Alternatively, just
+1. You'll need to unpack the gcc-ada tarball along with the gcc-core and 
+gcc-g++ tarballs so the GCC Ada sources are available. Alternatively, just 
 unpack the combined GCC tarball which contains all the compilers.
 
 2. Modify the ./configure command to pass --enable-languages=c,c++,ada
@@ -247,8 +322,8 @@
 
 There's some changes required to the Chapter 6 installation of GCC.
 
-1. You'll need to unpack the gcc-ada tarball along with the gcc-core and
-gcc-g++ tarballs so the GCC Ada sources are available. Alternatively, just
+1. You'll need to unpack the gcc-ada tarball along with the gcc-core and 
+gcc-g++ tarballs so the GCC Ada sources are available. Alternatively, just 
 unpack the combined GCC tarball which contains all the compilers. At this
 point also decide if you'd like to install additional (or all) compilers.
 There's nothing keeping you from installing all of the compilers included
@@ -264,7 +339,7 @@
 
 3. After the "make install" step, issue the following command:
 
-chown -v -R root:root /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/adainclude
+chown -v -R root:root /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/adainclude
 (modify the GCC version number in the path shown above)
 
 Except for the changes shown above, follow the commands as outlined in the
@@ -286,46 +361,41 @@
 ===========
 
 Following these easy instructions allows you to install the full suite of
-GCC compilers during your LFS build, eliminating the time-consuming and
+GCC compilers during your LFS build, eliminating the time-consuming and 
 perhaps risky process of reinstalling C and C++ later on during your BLFS
 adventure.
 
 
 ACKNOWLEDGEMENTS:
 
-* Randy McMurchy for the original hint.
 * Jim Gifford for the tip about using the existing Makefile to install GNAT.
 * The LFS community for creating and maintaining such a cool project.
 
 
 CHANGELOG:
 
-[2008-12-20]
-   * Updated to LFS 6.4.
-   * New maintainer: William Immendorf.
-   * Added note about gjar requiring zip and unzip.
-
 [2007-07-01]
-  * Updated the Gnat download instructions
-  * Updated the requirements to install the 'treelang' language
-  * Updated the GMP installation instructions
+    * Updated the Gnat download instructions
+    * Updated the requirements to install the 'treelang' language
+    * Updated the GMP installation instructions
 
 [2006-05-18]
-  * Changed the GNAT installation to use the existing Makefile, which
-    eliminates the need to install Tcsh.
+    * Changed the GNAT installation to use the existing Makefile, which
+      eliminates the need to install Tcsh.
 
 [2006-05-03]
-  * Updated for the LFS-6.2 version, including installing the 4.0.3
-    compiler. Added instructions to install all the compilers, not just
-    the Ada compiler.
+    * Updated for the LFS-6.2 version, including installing the 4.0.3
+      compiler. Added instructions to install all the compilers, not just
+      the Ada compiler.
 
 [2005-03-14]
-  * Fixed typo
-  * Modified the Chapter 5 instructions to not use forced static build
+    * Fixed typo
+    * Modified the Chapter 5 instructions to not use forced static build
 
 [2005-03-13]
-  * Added instructions to change the ownership of the Ada interface header
-    include files to root
+    * Added instructions to change the ownership of the Ada interface header 
+      include files to root
 
 [2005-03-12]
-  * Original draft
+    * Original draft
+

-- 
http://linuxfromscratch.org/mailman/listinfo/hints
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page