From owner-freebsd-hackers Wed Jul 11 15:30:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id EDED537B406 for ; Wed, 11 Jul 2001 15:30:05 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id IAA18968; Thu, 12 Jul 2001 08:30:02 +1000 (EST) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37640) with ESMTP id <01K5U5B37QWWVLX0PX@cim.alcatel.com.au>; Thu, 12 Jul 2001 08:30:00 +1000 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f6BMTxd46666; Thu, 12 Jul 2001 08:29:59 +1000 (EST envelope-from jeremyp) Content-return: prohibited Date: Thu, 12 Jul 2001 08:29:59 +1000 From: Peter Jeremy Subject: Re: Development for older FreeBSD releases To: "Bruce A. Mah" Cc: hackers@FreeBSD.ORG Message-id: <20010712082959.B506@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 11 Jul 2001 14:13:36 -0700, bmah@packetdesign.com (Bruce A. Mah) wrote: >I need to make an executable to run on an i386 box running FreeBSD 2.2.X >machine. Unfortunately, it has no compiler installed on it. ... >Is it even possible to try doing a "cross-compile" to such an old >version of FreeBSD? (I'm primarily thinking of a.out vs. ELF issues...a >quick experiment already informed me that I'm lacking an appropriate >crt0.o.) At least the later 2.2.x kernels can run ELF executables. I'm not sure when ELF was added, but it was before 2.2.5. I can build a trivial[1] static executable using the -CURRENT toolchain and run it on a 2.2.5 machine. I can't quickly test a dynamic executable (I'd need to copy the ELF loader and shared libraries onto my 2.2.5 system). >Or am I better off trying somehow to build up a 2.2.X machine to do >development on? It is possible to do a buildworld of RELENG_2_2 on a -CURRENT system when chroot'd into a 2.2.5 userland. (Unfortunately, this won't help you since you need the 2.2.x compiler). About 6 months ago, I tried and failed to get a RELENG_2_2 buildworld to work using the -CURRENT toolchain, though it should be possible to build the 2.2.x compiler on -CURRENT. As Greg Black stated, your easiest option would be to use a 2.2.x CD-ROM. If you don't have the CD-ROM's and are just missing the compiler, I'd be happy to e-mail you a copy of cc, cc1, as and ld for any 2.2.x-RELEASE. [1] main() { printf("Hello World\n"); }. Non-trivial programs will run into syscall incompatibilities - the most obvious being the signal() changes just under 2 years ago. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message