		  Building Libg++ 1.37.0 for the Apollo
			       4-May-90
			      John Vasta

		Changes for libg++-1.39 by Christos Zoulas
			christos@ee.cornell.edu

These changes enable libg++ 1.39.0 to be built on Apollo SR10.x 68K
machines running G++ 1.39.1.

The following prerequisites are required:

  1. Running SR10.2 or later and using version 6.7 or later of the
     Apollo C compiler (it may work on earlier SR10 releases and C
     compilers, but I haven't tried it).

  2. Running in a bsd4.3 environment in order to build the GNU
     software (although the resulting binaries will work in any
     environment).

  3. Already have G++ 1.40 up and running (you'll need to get my
     G++/GCC changes from the same place you got this stuff from).

  4. Virgin distribution of libg++ 1.39.0 (available via anonymous ftp
     from prep.ai.mit.edu in the /pub/gnu directory, as well as from
     other sites).

 Here are the steps to follow:

  1. Get G++ 1.39.1 built and installed (which requires getting GCC
     1.37.1 built and installed). You'll need my patch kits for those
     also; you should be able to get them from the same place where
     you found this stuff.

  2. Get the libg++-1.39.0 distribution and set it up. It should
     reside in a directory named `libg++-1.39.0'.

  3. If you got the shar file containing diffs, then you should have
     unpacked it to get these files:

	APOLLO-LIBG++-README
	diffs

     Patch the files in libg++-1.37.0 using diffs
     as the input to the /usr/new/patch utility. NOTE: you should use
     the -p option with patch so that it patches files in
     subdirectories, and do the patching from the directory containing
     the libg++ directory. For example, if you have the directory
     /usr/local/gnu/libg++-1.37.0, then do this:

	cd /usr/local/gnu
	patch -p < diffs


  4. Edit the Makefile to correctly define the PWD macro for the
     location of the libg++ directory.

  5. Build libg++: executing just `make' will make everything,
     including all the tests and example programs - it will take
     awhile. I recommend doing just `make src' and `make tests' first
     to see that it builds OK and that the tests run. Expect to see
     some differences in the test output. Most of them are due to
     slight differences in floating point numbers, but I haven't
     tracked down the source of all the differences. There may be some
     problems in g++ affecting the results.

     Here is the contents of the tests/checktests.diffs file that I
     get:

	    1d0
	    < Must run test0 from tty
	    479c478
	    < < -2.22045e-16 : 36
	    ---
	    > < -1.0842e-19 : 36
	    495c494
	    < .1 [33] =  0.10000 [33]
	    ---
	    > .1 [33] =  0.10001 [33]
	    499,500c498,499
	    < .1 [16] =  0.09998 [16]
	    < .1 [33*] =  0.09998 [33]
	    ---
	    > .1 [16] =  0.10001 [16]
	    > .1 [33*] =  0.10001 [33]
	    504c503
	    < .1 [16] == .1 [33] = 0
	    ---
	    > .1 [16] == .1 [33] = 1
	    508c507
	    < 1073741824 = 1.07374e+09
	    ---
	    > 1073741824 = 16384
	    512,518c511,517
	    < .1 [33] + .5 [16] =  0.60000 [33]
	    < .1 [33] - .5 [16] = -0.40000 [33]
	    < .1 [33] * .5 [16] =  0.05000 [49]
	    < .1 [33] *  3 =  0.30000 [33]
	    < .1 [33] * -3 = -0.30000 [33]
	    < -.1 [33] *  3 = -0.30000 [33]
	    < -.1 [33] * -3 =  0.30000 [33]
	    ---
	    > .1 [33] + .5 [16] =  0.60001 [33]
	    > .1 [33] - .5 [16] = -0.39999 [33]
	    > .1 [33] * .5 [16] =  0.04999 [49]
	    > .1 [33] *  3 =  0.30002 [33]
	    > .1 [33] * -3 = -0.30002 [33]
	    > -.1 [33] *  3 = -0.30002 [33]
	    > -.1 [33] * -3 =  0.30002 [33]
	    520,524c519,523
	    < .1 [33] % 25 =  0.10000 [58]
	    < .1 [33] % -25 =  0.09375 [8]
	    < .1 [33] / .5 [16] =  0.20001 [33]
	    < .1 [33] << 1 =  0.20000 [33]
	    < -.1 [33] >> 2 =  0.47500 [33]
	    ---
	    > .1 [33] % 25 =  0.10001 [58]
	    > .1 [33] % -25 =  0.10001 [8]
	    > .1 [33] / .5 [16] =  0.19995 [33]
	    > .1 [33] << 1 =  0.20001 [33]
	    > -.1 [33] >> 2 =  0.47498 [33]
	    532c531
	    < siz = 3
	    ---
	    > siz = 1
	    534,535c533,534
	    < man =  ccccccc8000
	    < val = 0.1
	    ---
	    > man =  ccd
	    > val = .100006
	    548c547
	    < .95 [16] + .1 [33] =  1.00000 [33]
	    ---
	    > .95 [16] + .1 [33] =  0.99997 [33]
	    550c549
	    < .5 [17] * 2 =  0.99998 [17]
	    ---
	    > .5 [17] * 2 =  0.99997 [17]
	    554c553
	    < .95 [16] + .1 [33] = -0.94999 [33]
	    ---
	    > .95 [16] + .1 [33] = -0.94998 [33]
	    556c555
	    < -.1 [33] - .95 [16] =  0.94999 [33]
	    ---
	    > -.1 [33] - .95 [16] =  0.94998 [33]

John Vasta                Hewlett-Packard Apollo Systems Division
vasta@apollo.hp.com       M.S. CHA-01-LT
(508) 256-6600 x6362      300 Apollo Drive, Chelmsford, MA 01824
UUCP: {decwrl!decvax, mit-eddie, attunix}!apollo!vasta
