gcc-3.2.1

Introduction to gnat (binary version)

下载地址 (HTTP):       
下载地址 (FTP):              ftp://cs.nyu.edu/pub/gnat/3.14p/gnat-3.14p-i686-pc-linux-gnu-bin.tar.gz
版本:                        3.14p
软件包大小:                   10.5 MB
估计所需硬盘空间:           40 MB

gnat 软件包包含了预编译的Ada编译器。安装这个包是为了满足重新编译gcc中的ada时所需要的循环依赖关系。

如果你不想编译gcc中的ada语言编译器,你可以不安装这个gnat.

gnat 依赖于:
tcsh-6.12

安装 gnat

命令如下:

./doconfig

上面的脚本会问你怎样和在哪里安装gnat. 为了避免与系统中gcc的冲突,我们将把这个包装在另外的目录里,以便以后删除.

在回答doconfig脚本的问题时,第一个问题输入 3 ,第二个问题输入/opt/gnat.

完成安装:

./doinstall

用上面脚本安装的 gnat 编译器能作为gcc二进制文件调用,为了避免与gcc的冲突,我们将重命名gcc命令.

cd /opt/gnat/bin &&
mv gcc gnatgcc &&
cd real &&
mv gcc gnatgcc

介绍 gcc

下载地址 (HTTP):       http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.2.1/gcc-3.2.1.tar.bz2
下载地址 (FTP):        ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.2.1/gcc-3.2.1.tar.bz2
使用版本:                   3.2.1
包的大小:                   20.1 MB
估计所需硬盘空间:  591 MB

gcc 软件包包含 GNU 的编译器.用于编译Ada,C C++,Fortran, Java和Objective C写的程序.

安装gcc

命令如下:

PATH_HOLD=$PATH &&
export PATH=$PATH:/opt/gnat/bin &&
cd gcc/ada &&
touch treeprs.ads [es]info.h nmake.ad[bs] &&
cd ../.. &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.2.1/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 install-no-fixedincludes &&
ln -sf g77 /usr/bin/f77 &&
export PATH=$PATH_HOLD

你可以删除gnat:

rm -rf /opt/gnat

命令解释

PATH_HOLD=$PATH :这个命令存储你更改前的现有路径,所以可以恢复在安装后.

export PATH=$PATH:/opt/gnat/bin : 这个命令允许建立命令(build) 去找gnat的Ada编译器来建立Ada.

touch treeprs.ads [es]info.h nmake.ad[bs] : 这个命令创建 ada编译需要的文件。如果你不想编译 ada的前端,可以跳过这个命令。

--enable-languages=c,c++,objc,f77,ada,java : 这个命令创建所有可获得的编程语言到gcc软件包中. 你可以修改删除你不想要的语言.

--enable-shared --enable-threads=posix --enable-__cxa_atexit : 这个命令用来建立公布标准的C++ 库.

--enable-clocale=gnu : 这个命令对未完成的本地数据 (localedata)是故障无碍的.

make gnatlib_and tools : 这个命令完成Ada的创建进程.如果你没有打开ada,就跳过这一步。

内容

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, gnatxrefgcc 库.

具体说明

上面多数程序和库已经在LFS gcc-3.2.1 上列出,除了:

g77

g77 是gcc调用的fortran编译语言.

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 souce 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 ia 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.