Subject: Re: NOTICE: i386 port switched to ELF binary format
To: Frank van der Linden <frank@wins.uva.nl>
From: Paul Goyette <paul@whooppee.com>
List: port-i386
Date: 07/05/1999 09:37:51
On Mon, 5 Jul 1999, Frank van der Linden wrote:

> > How do I upgrade by compiling sources, without getting snapshot?
> 
> That's not straightforward. Be prepared to get yourself out of trouble
> in strange ways if it fails. Basically you have to:
> 
> 	0) have today's sources
> 	1) create /emul/aout as described before (i.e. copy all
> 	   shared libs to /emul/aout/usr/lib)

Does this mean _all_ shared libs, including those that live in
/usr/pkg/lib?  Do the ones from /usr/pkg/lib go into their own 
directory /emul/aout/usr/pkg/lib or into the standard place?

> 	2) boot a kernel with COMPAT_AOUT (as well as EXEC_ELF32, of course)

Does the kernel have to be built with OBJECT_FMT = ELF, or will
the old build procedures work?

> 	3) setenv DESTDIR /..
> 	4) setenv OBJECT_FMT ELF
> 	5) cd /usr/src ; make includes
> 	6) cd /usr/src/share/mk ; make install

(suggest continuing on with original numbering, rather than
going back to 4!  :)

> 	4) for each directory in
> 	   /usr/src/gnu/usr.bin/{binutils,gas.new,ld.new,egcs} do:
> 	   cd <directory>
> 	   make
> 	   (link will fail because OBJECT_FMT is set to elf)
> 	   setenv OBJECT_FMT a.out
> 	   make
> 	   setenv OBJECT_FMT ELF

I think I'd recommend doing a ``make cleandir'' here before the
first ``make''

> 	5) make install in each of those directories
> 	   (you now have a toolchain of a.out binaries that will generate
> 	    ELF binaries)
> 	6) cd /usr/src/lib/csu ; make && make install

Ditto with the ``make cleandir''

> 	7) you can now try a "make build" in /usr/src
> 
> I _think_ that is what I did, but I can't guarantee anything. If you
> want to it this way, good luck, but if you end up having to repair
> the system by booting single-user or from floppy, don't blame me ;-)

--------------------------------------------------------------------------
| Paul Goyette      | PGP DSS Key fingerprint:   | E-mail addresses:     |
| Network Engineer  |   BCD7 5301 9513 58A6 0DBC |  paul@whooppee.com    |
| and kernel hacker |   91EB ADB1 A280 3B79 9221 |  pgoyette@juniper.net |
--------------------------------------------------------------------------