作为自由软件的旗舰项目,Richard Stallman 在十多年前刚开始写作 GCC 的时候,还只是把它当作仅仅一个C 程序语言的编译器;GCC 的意思也只是 GNU C Compiler 而已。经过了这么多年的发展,GCC 已经不仅仅能支持 C 语言;它现在还支持 Ada 语言,C++ 语言,Java 语言,Objective C 语言,Pascal 语言,COBOL 语言,以及支持函数式编程和逻辑编程的 Mercury 语言,等等。而 GCC 也不再单只是 GNU C 语言编译器的意思了,而是变成了 GNU Compiler Collection 也即是 GNU 编译器家族的意思了 另一方面,说到 GCC 对于各种硬件平台的支持,概括起来就是一句话:无所不在。几乎所有有点实际用途的硬件平台,甚至包括有些不那么有实际用途的硬件平台,比如 Don Knuth 设计的 MMIX 计算机,GCC 都提供了完善的支持。 如果把我们自己的程序语言的实现建立于 GCC 之上,也立刻使得我们的程序语言的实现版本可以运行在几乎所有有用的硬件平台之上。这对于程序语言的作者来说,也是一个确实的有极大诱惑力的好处。
环境: 操作系统是IBM Aix5.1 机器为IBM,7044-170 Processor Type: PowerPC_POWER3 Number Of Processors: 1 Processor Clock Speed: 333 MHz CPU Type: 64-bit Kernel Type: 32-bit
1. Installing the RedHat Package Manager (RPM) 在安装GCC软件之前,必须安装RPM - the RedHat Package Manager。 你需要用installp安装RPM包, 下载此包的地址为: ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc/rpm.rte 安装rpm 包,必须以root 用户操作,命令如下:
SUCCESSES --------- Filesets listed in this section passed pre-installation verification and will be installed. Selected Filesets ----------------- rpm.rte 3.0.5.36 # RPM Package Manager << End of Success Section >> FILESET STATISTICS ------------------ 1 Selected to be installed, of which: 1 Passed pre-installation verification ---- 1 Total to be installed
installp: APPLYING software for: rpm.rte 3.0.5.36 . . . . . << Copyright notice for rpm.rte >> . . . . . . . Licensed Materials - Property of IBM
5765E6100 & Copyright International Business Machines Corp. 2000, 2002. & Copyright Regents of the University of California 1990, 1993, 1994, 1995. & Copyright Jean-loup Gailly and Mark Adler, 1995 - 1998. & Copyright The President and Fellows of Harvard University 1995, 1996. & Copyright Julian R Seward, 1996 - 2000 & Copyright Sleepycat Software, 1990 - 2000 All rights reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. . . . . . << End of copyright notice for rpm.rte >>. . . . Please wait... Finished processing all filesets. (Total time: 8 mins 19 secs). +-----------------------------------------------------------------------------+ Summaries: +-----------------------------------------------------------------------------+ Installation Summary -------------------- Name Level Part Event Result ------------------------------------------------------------------------------- rpm.rte 3.0.5.36 USR APPLY SUCCESS rpm.rte 3.0.5.36 ROOT APPLY SUCCESS #
2.Using the RedHat Package Manager (RPM) 使用RPM的完整信息详见www.rpm.org. 基本的安装操作参数: -i: install -e: erase -q: query --help: help rpm程序在/opt/freeware/bin/中 #cd /opt/freeware/bin/ # ./rpm RPM version 3.0.5 Copyright & 1998 - Red Hat Software This may be freely redistributed under the terms of the GNU GPL