Subject: Re: NOTICE: i386 port switched to ELF binary format
To: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
From: Frank van der Linden <frank@wins.uva.nl>
List: port-i386
Date: 07/05/1999 16:03:14
On Mon, Jul 05, 1999 at 09:55:40PM +0900, Takahiro Kambe wrote:
> > be aware that ELF is now the default binary format, so you'll have
> > to deal with this after you next updated your sources and want to
> > recompile your system.
> Is there any way to use AOUT format?
If you want to keep on using the a.out format, you can do this by
reverting the change to /usr/src/share/mk/bsd.own.mk. Look for the
part where OBJECT_FMT is set, and change it back for the i386 case.
>
> 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)
2) boot a kernel with COMPAT_AOUT (as well as EXEC_ELF32, of course)
3) setenv DESTDIR /..
4) setenv OBJECT_FMT ELF
5) cd /usr/src ; make includes
6) cd /usr/src/share/mk ; make install
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
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
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 ;-)
- Frank