From owner-freebsd-current Wed Jun 10 10:34:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA23136 for freebsd-current-outgoing; Wed, 10 Jun 1998 10:34:23 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from hal-pc.org (hal-pc.org [204.52.135.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA23128 for ; Wed, 10 Jun 1998 10:34:18 -0700 (PDT) (envelope-from jes@hal-pc.org) Received: from jason (56K-016.MaxTNT2.pdq.net [209.144.227.16]) by hal-pc.org (8.9.0/8.9.0) with SMTP id MAA25207 for ; Wed, 10 Jun 1998 12:34:12 -0459 (CDT) From: "Jason" To: Subject: Re: ELF preparation step 2 done Date: Wed, 10 Jun 1998 12:33:52 -0500 Message-ID: <01bd9495$ef551350$016f6f6f@jason.vipersystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >The & of all Evil wrote: >> "Brian Feldman" writes: >> >> > Well, after making world and having all /usr/libexec/{elf,aout}, I guess one could make an ELF world in a couple steps, if they're interested: >> > 1. export BINFORMAT=elf and make usr.bin/objformat, and make install it >> > 2. go to lib/, 'echo "BINFORMAT=elf" > /etc/objectformat' and make all the libs, and install them (to /usr/lib? mine installed there, I moved them to /usr/lib/elf, should the elf libs really be there or just /usr/lib?) >> > 3. make the world; it _should_ work now, but I didn't try it > ^^^^^^^^^^^^^^^^^^^ >Obviously. > >> >> singularity:/usr/src/lib 14# make all >> ===> libcom_err >> cc -O -pipe -c /usr/src/lib/libcom_err/com_err.c -o com_err.o >> Unrecognized line in /etc/objectformat: BINFORMAT=elf >> Unrecognized line in /etc/objectformat: BINFORMAT=elf >> com_err.o: file not recognized: File format not recognized > >A few things (not necessarily all) you need to do: > >1. Make world to get aout and elf tools (built as aout executables) in > their new places and objformat installed in /usr/bin. >2. chflags -R noschg /usr/obj/usr/src/tmp >3. rm -rf /usr/obj/* >4. Create /etc/objectformat with the line OBJFORMAT=elf >5. Add BINFORMAT=elf to /etc/make.conf >6. cd /usr/src/csu/i386-elf; make obj/depend/all/install >7. cd /usr/src/gnu/usr.bin/cc/libgcc; make obj/depend/all/install >8. cd /usr/src/lib/libc; make obj/depend/all/install >9. cd /usr/src/libexec/rtld-elf; make obj/depend/all/install >10. cd /usr/src/lib; make obj/depend/all/install >11. cd /usr/src/gnu/lib; make obj/depend/all/install >12. cd /usr/src; make obj/depend/all/install > >I have tried this. Step 12 bombs in src/gnu/usr.bin/ld. The big problem is make.conf isn't included soon enough to get the BINFORMAT=elf, instead it relies on test mostly of .if ${MACHINE} == "alpha" BINFORMAT?= elf .else BINFORMAT?= aout .endif This is also why when building elf libraries that they are installed by default into /usr/lib/aout. Can you say bad magic number? This needs to be fixed to get an elf machine with a buildworld/makeworld. One work around maybe to go into your src/share/mk directory and at the top of each makefile put a BINFORMAT=elf just to be shure. -Jason- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message