close
Reference data: The Definitive Guide to GCC, second edition, William von Hagen
Environment: Ubuntu 7.10
Prerequisite: Prepare about 1.5 GB free disk space for building and installing GCC.
1. Install essential utilities (root)
Download gcc-VERSION.bz2 and gcc-testsuite-VERSION.bz2 to ~/src directory. /* replace VERSION with the appropriate numeric value for the version of GCC that we are using */
Add /usr/local/gccVERSION/bin to the PATH environment variable and make this setting before the original PATH setting of GCC.
Environment: Ubuntu 7.10
Prerequisite: Prepare about 1.5 GB free disk space for building and installing GCC.
1. Install essential utilities (root)
2. Install the source code, set up the configuration settings, and compile the compilers (user)apt-get install bash binutils bison dejagnu flex gcc g++ gnat make tar tcl(8.4) expect gperf autoconf automake texinfo gettext gfortran gcj autogen
Download gcc-VERSION.bz2 and gcc-testsuite-VERSION.bz2 to ~/src directory. /* replace VERSION with the appropriate numeric value for the version of GCC that we are using */
3. Test the build, optional operation (user)mkdir -p ~/src/gcc-obj
cd ~/src
tar jxf gcc-VERSION.bz2 /* ~/src/ */
tar jxf gcc-testsuite-VERSION.bz2 /* ~/src/ */
cd ~/src/gcc-VERSION /* source directory */
cd ~/src/gcc-obj /* build directory */
../gcc-VERSION/configure --prefix=/usr/local/gccVERSION /* run configuration script & indicate the directory for installing GCC */
make bootstrap /* ~/src/gcc-obj/, it may take several hours to finish this job */
Submit the test results to the GCC project by using teh test_summary scriptmake -k check /* ~/src/gcc-obj/, make sure tcl, expect, gcc-testsuite, and dejagnu are installed */
4. Install GCC (root)~/src/gcc-VERSION/contrib/test_summary [-p extra_info.txt] -m gcc-testresults@gcc.gnu.org | /bin/sh
5. Change the PATH environment variable settingcd ~/src/gcc-obj
make install /* ~/src/gcc-obj/ */
ldconfig -v /* update the dynamic linker's chche file, locate the new shared libraries */
Add /usr/local/gccVERSION/bin to the PATH environment variable and make this setting before the original PATH setting of GCC.
全站熱搜
留言列表