From: hlu@yoda.eecs.wsu.edu (Hongjiu Lu -- Graduate Student)
Newsgroups: alt.os.linux,comp.os.linux
Subject: gcc 2.1 beta is available
Date: 6 Apr 92 05:17:24 GMT
Organization: Washington State University
Originator: hlu@yoda.eecs.wsu.edu

Hi,

I am putting gcc 2.1 beta on headrest.woz.colorado.edu under
/pub/linux/gcc and banjo.concert.net under /pub/Linux/GCC. They should
be there in a few hours. Drew, could you please move 2.1lib.tar.Z,
2.1misc.tar.Z, libc-2.1.tar.Z and 2.1shared-A.tar.Z to /pub/linux/gcc?

Although gcc 2.1 is beta, it is quite stable. During the alpha testing
stage, we fixed lots of bugs. It should run well for most of you.
But I cannot guarantee it has no bugs. If you find any bug, please
send it to me at "hlu@eecs.wsu.edu" as well as the channel "GCC" on the
Linux mailing list.

THANKS TO ALL THE ALPHA TESTERS. You did a great job and help me a lot,
Without you guys, I cannot image how I could find all those bugs.

I am enclosing the FAQ for gcc 2.1. PLEASE DO READ IT. It may have the
answers for your questions. You must follow the instructions in the FAQ.

I also put a patch, 2.1kernel.tar.Z, for kernel to compile with
gcc 2.1. You have to apply Linus' second patch first. And another
package, 2.1ps.tar.Z, for ps is modified by me to gcc 2.1.

BTW, make sure tar and compress you have are working right. Some
problems for the previous gcc 2.1 seemed to be caused by bad
tar/compress.

H.J.
-- 
School of EECS				Internet: hlu@eecs.wsu.edu
Washington State University		BITNET:   60935893@WSUVM1.BITNET
Pullman, WA 99164			Phone:    (509) 335-6470 (O)
USA						  (509) 334-6315 (H)
---------FAQ-------
QUESTION: Where is the gcc 2.1 beta?

ANSWER: It's on banjo.concert.net under /pub/Linux/GCC and
headrest.woz.colorado.edu 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

	/usr/shared/obj/README*

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
ANY OTHER C COMPILER ON YOUR SYSTEM INSTALLED. I heard too much stories
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
do

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

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 
here.

	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)
	b. math (some are new)
	c. termcap
	d. unistd

5. The shared libraries are here. To link with the static libraries,
add the -static flag to gcc.

QUESTION: Is stdio ANSI compatible?

ANSWER: Yes, please test it.

QUESTION: Is g++ in 2.1?

ANSWER: Yes. Use g++ to compile the C++ code. Libg++.a 2.0 is here.
One thing missing is curses. I will take a look if I have time. And
fix.o failed to compile. 

QUESTION: What options can I use for gcc?

ANSWER: Read manual page, gcc.ps or gcc.man. -O3, -O4, -O5 or even
higher 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 default is the shared libraries.

QUESTION: Where is the source code of the new libc.a?

ANSWER: The same place you find this file. It is called libc-2.1.tar.Z.

QUESTION: How can I use gcc 2.1 to compile the kernel?

ANSWER: The kernel has to be compiled with the header files come with
it. I will ask Linus to make it easy for you. Please keep in mind,
kernel 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
format?

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.