From owner-freebsd-questions Wed Dec 15 21:13:59 1999 Delivered-To: freebsd-questions@freebsd.org Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (Postfix) with ESMTP id 26AB515579 for ; Wed, 15 Dec 1999 21:13:49 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.8.8/8.8.8) id GAA24714 for freebsd-questions@FreeBSD.ORG; Thu, 16 Dec 1999 06:13:47 +0100 (CET) (envelope-from olli) Date: Thu, 16 Dec 1999 06:13:47 +0100 (CET) From: Oliver Fromme Message-Id: <199912160513.GAA24714@dorifer.heim3.tu-clausthal.de> To: freebsd-questions@FreeBSD.ORG Subject: Re: Compiling for v2.2.8 with a 3.X machine Organization: Administration TU Clausthal Reply-To: freebsd-questions@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: TIN [version 1.2 RZTUC(3) PL2] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mark Barr wrote in list.freebsd-questions: > I was wondering if it is possible to compile C code using GCC on a 3.3 > FreeBSD machine, but create binaries compatible with v2.2.8. The machine I'm > using has compat22 installed, but I don't know if it allows you to create > a.out binaries. Any help would be appreciated. The problem is _not_ a.out vs. ELF, because FreeBSD can run ELF binaries for a long time, including 2.2.8. The problem is that 3.3 has different (newer) libraries than 2.2.8. I haven't actually tried this myself, but it should be possible to copy the libs from 2.2.8 to your 3.3 machine (if you don't already have them), and then tell the compiler to use those, and not to use the standard system libraries (-nostdlib). You then have to specify the 2.2.8 libc explicitely, and probably crt1.o, too. Regards Oliver -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) "In jedem Stück Kohle wartet ein Diamant auf seine Geburt" (Terry Pratchett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message