Dec 182017
LINUX GNU GCC C and C++ compiler frequently asked questions and answers, installation information for GCC 2.1.
File GCC21FAQ.ZIP from The Programmer’s Corner in
Category UNIX Files
LINUX GNU GCC C and C++ compiler frequently asked questions and answers, installation information for GCC 2.1.
File Name File Size Zip Size Zip Type
21-FAQ.TXT 5672 2373 deflated

Download File GCC21FAQ.ZIP Here

Contents of the 21-FAQ.TXT file

QUESTION: Where is the gcc 2.1 beta?

ANSWER: It's on under /pub/Linux/GCC and under /pub/linux/?. You may find it on the
other sites. But I am not sure if they are up to date. There are two
files, 2.1lib.tar.Z and 2.1misc.tar.Z. Another file, binutils.tar.Z,
is not the part of gcc 2.1, but used by gcc 2.1. It contains all the
binary utilities you need to run gcc 2.1.

There may be also some files called 2.1shared-x.tar.Z. They have some
programs compiled in .a format. Please take a look at


after unpack 2.1shared-A.tar.Z under /usr.

QUESTION: What are the contents of them?

ANSWER: 2.1lib.tar.Z contains cc1, cc1plus and cpp. 2.1misc.tar.Z
contains gcc 2.1 drivers, header files, libraries, manual pages and
installation instructions.

QUESTION: How do I install it?

ANSWER: First of all, backup the old compiler if you have one and
remove it from your hard drive. YOU MUST BE ABSOLUTELY SURE THERE IS NO
about it. By compiler, I mean the executables, libraries (crt0.o) and
header files. This gcc 2.1 will only work with the kernel above 0.95.
You may have to have 2 MB ram to run it and have some swap space
(> 4MB) since cc1 and cc1plus are about 1 MB. First do

cd /usr
tar xvpfvz xxxx/2.1misc.tar.Z

Then read FAQ in /usr/install/gcc2. After

cd /usr
tar xvpfvz xxxx/2.1lib.tar.Z

run the shell script "inst2.x". If you need binutils.tar.Z, do a

cd /usr
tar xvpfvz xxxx/binutils.tar.Z

Please check the file permission for all files you have unpacked. Maybe
I should write a shell script to do that.

QUESTION: How do I install a new release of gcc 2.1?

ANSWER: Depends on the nature of the new release, if the gcc itself is
changed, you have to install everything in 2.1lib.tar.Z and
2.1misc.tar.Z come with the new release. If just the libraries are
changed, you can just pick 2.1update.tar.Z and unpack it in /usr. Then

cd /usr
tar xvpfvz xxxx/2.1update.tar.Z
cd /usr/install/gcc2

In both cases, it is recommended to relink all the shared executables.
If the gcc itself is changed, a new set of .a's may be released too.

QUESTION: What are the main differences with the old release?

ANSWER: Here are the features

1. gcc and g++ are in one.

2. ANSI and BSD 4.4 compatible stdio.

3. iostream for g++. It has

* Full implementation of ANSI C stdio.
* Full implementation of the streambuf layer of AT&T's
iostream library for C++.
* Full compatibility between stdio and streambufs.

and libg++.a 2.0.

4. Libc.a is almost new. Most of glibc.a 1.02 (nonnetwork stuffs) are

a. ctype
b. grp
c. locale
d. malloc (libmcheck.a)
e. posix
f. pwd
g. stdlib
h. string

Some other functions are added.

b. cvt
b. drand48
c. getlogin (poeigl-1.2)
d. getpass (poeigl-1.2)
e. mkfifo (is that supported in kernel?)
f. regex (GNU)
g. curses (BSD)
h. swab
i. time (BSD, untested)
j. ufc
k. utmp stuffs (poeigl-1.2)

These old functions are not changed very much.

a. soft math (fmod is added)

s are. To link with the static libraries,
-static flag to gcc.
io ANSI compatible?
se tit.
to le the ++ cod Libg+a 2.0 i here.One thg missg is cuses. I ill take a look if I have time. And

NSead manual page, or -O3, -O4, -O5 or even
highr should work with 2.1. -O3 is said to be the best. Don't ask me
why. Try it yourself. Also -static tells gcc to use the static
libraries. The defaul shared libraries.
herethe source code of the new libc.a?
e same place you find this file. It is called libc-2.1.tar.Z.

gcc 2.1 to compile the kernel?
ernel has to be compiled with the header files come with
it. will ask Linus to make it easy for you. Please keep in mind,
rnel uses the different header files. Do not include any header files
from gcc 2.1. It can be done by using

cc -nostdinc -I....

QUESTION: Why does gcc say "foo.h not found" when compiling the
kernel and I am following the instruction above?

ANSWER: Not every source code under ./linux is kernel code. By kernel,
I mean those linked together and written to boot image. If there is a
file which is compiled to run under Linux, that is an application and
you should follow the instruction below.

QUESTION: How can I use gcc 2.1 to compile applications?

ANSWER: Any application has to be compiled with the header files come
with gcc 2.1. If you need some header files from the kernel sources,
do a

#include "/foo/src/linux/include/linux/bar.h"

It is strongly recommended to prototype all the library functions by
including the appropriate head files. At least, it will save you
trouble of malloc (0).

QUESTION: Why does a program compiled ok by gcc 2.1 and the new binary
utilities get an error from kernel saying something about binary file

ANSWER: Linux has changed a.out.h. The new a.out.h is compatible with
the applications compiled with the old a.out.h. But if an application is
compiled with the new a.out.h, you have to use the new a.out.h. If you
get this error message, you should get the new a.out.h and old ld from
where you get this and use them to recompile the kernel.

QUESTION: Why does g++ complain?

ANSWER: You need "expr". It is in GNU shell utilities 1.6.

 December 18, 2017  Add comments

Leave a Reply