%general-entities; ]> GCC-&gcc-version; Introduction to <application><acronym>GCC</acronym></application> The GCC package contains GNU compilers. This is useful for compiling programs written in Ada, C, C++, Fortran, Java and Objective C. Package information Download (HTTP): Download (FTP): Download size: &gcc-size; Estimated Disk space required: &gcc-buildsize; Estimated build time: &gcc-time; Additional Downloads Required Patch: Installation of <application><acronym>GCC</acronym></application> If you plan to compile Ada, you will need to install GNAT temporarily to satisfy the circular dependency when you recompile GCC to include Ada. Package information Download (HTTP): Download (FTP): Download size: &gnat-size; Estimated Disk space required: &gnat-buildsize; Estimated build time: &gnat-time; <application><acronym>GNAT</acronym></application> dependencies Required Installation of <application><acronym>GNAT</acronym></application> Install GNAT by running the following commands: ./doconfig The above script will ask you how and where you would like to install GNAT. To avoid conflicts with the system gcc, the package will be installed in a separate directory, that can later be removed from the system. In response to the questions asked by the doconfig script, enter 3 in response to the first question and /opt/gnat in response to the second question. To finish the install, run: ./doinstall The GNAT compiler can be invoked by executing the gcc binary installed by the above script. Return to Installation of <application><acronym>GCC</acronym></application> Patch the source files with the following command: patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch && sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in Install GCC by running the following commands: PATH_HOLD=$PATH && export PATH=/opt/gnat/bin:$PATH && cd gcc/ada && touch treeprs.ads [es]info.h nmake.ad[bs] && cd ../.. && mkdir ../gcc-build && cd ../gcc-build && CC=/usr/bin/gcc ../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \ --enable-languages=c,c++,objc,f77,ada,java --enable-threads=posix \ --enable-__cxa_atexit --enable-clocale=gnu && make bootstrap && make -C gcc gnatlib_and_tools && make -k check && make install && ln -sf ../usr/bin/cpp /lib && ln -sf gcc /usr/bin/cc && ln -sf g77 /usr/bin/f77 && export PATH=$PATH_HOLD You may remove the GNAT installation: rm -rf /opt/gnat Command explanations PATH_HOLD=$PATH: This command stores your current path before it's modified so that it can be restored after installation. export PATH=/opt/gnat/bin:$PATH: This command allows the build to find GNAT's Ada compiler to build Ada. touch treeprs.ads [es]info.h nmake.ad[bs]: This command creates necessary files for the Ada build. This step may be skipped if you don't want to compile the Ada front end. CC=/usr/bin/gcc: This command works around the new PATH which puts GNAT 's gcc as the primary compiler. --enable-languages=c,c++,objc,f77,ada,java: This command builds all available languages in the GCC package. You may modify this command to remove unwanted languages. --enable-shared --enable-threads=posix --enable-__cxa_atexit: These commands are required to build the C++ libraries to published standards. --enable-clocale=gnu: This command is a failsafe for incomplete locale data. make gnatlib_and tools: This command completes the Ada build process. Skip this step if you have not enabled Ada as one of the languages. Contents The GCC package contains c++, c++filt, cpp, g++, g77, gcc, gccbug, gcov, glob, gnat, gnatbind, gnatbl, gnatchop, gnatfind, gnatkr, gnatlink, gnatls, gnatmake, gnatprep, gnatpsta, gnatpsys, gnatxref and GCC libraries. Description The programs and libraries whose descriptions are missing here have been described in the LFS GCC-&gcc-version; page. g77 g77 is the Fortran compiler invoked by gcc. add2line add2line converts the ASCII form of the 2-line orbital elements in a file to binary form and appends them to the orbdata files. gcov gcov is a test coverage program. gdb gdb is the GNAT debugger. gnatbind gnatbind is used to bind compiled objects. gnatbl gnatbl is the Ada linker. gnatchop gnatchop is useful for renaming files to meet the standard Ada default file naming conventions. gnatelim gnatelim is used to detect and eliminate unused subprograms in an Ada partition. gnatfind gnatfind is the GNAT definition/use finder. gnatgcc gnatgcc is the compiler. gnathtml.pl gnathtml.pl converts Ada source files to HTML for viewing in Web browsers. gnatkr gnatkr is used to determine the crunched name for a given file, when crunched to a specified maximum length. gnatlink gnatlink is used to link programs and build an executable file. gnatls gnatls is the compiled unit browser. gnatemake gnatmake is an automatic make facility. gnatmem gnatmem is the GNAT utility that monitors dynamic allocation and deallocation activity in a program. gnatprep gnatprep is the GNAT external preprocessor. gnatpsta gnatpsta determines the values of all the relevant parameters in Standard and outputs to stdout. gnatpsys gnatpsys determines the values of all the relevant parameters in System and outputs to stdout. gnatstub gnatstub is a generator of body stubs. gnatxref gnatxref is the GNAT cross-referencer. gvd gvd is the GNU Visual Debugger.