From owner-freebsd-amd64@FreeBSD.ORG Wed Nov 28 19:03:35 2007 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C013F16A421 for ; Wed, 28 Nov 2007 19:03:35 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mired.org (bhuda.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id 9992A13C459 for ; Wed, 28 Nov 2007 19:03:34 +0000 (UTC) (envelope-from mwm@mired.org) Received: (qmail 52003 invoked from network); 28 Nov 2007 18:37:26 -0000 Received: from unknown (HELO mbook.mired.org) (192.168.195.2) by 0 with SMTP; 28 Nov 2007 18:37:26 -0000 Date: Wed, 28 Nov 2007 13:35:46 -0500 From: Mike Meyer To: freebsd-amd64@freebsd.org Message-ID: <20071128133546.3e5154a5@mbook.mired.org> In-Reply-To: <1196266496.551294@vestein.arb-phys.uni-dortmund.de> References: <1196266496.551294@vestein.arb-phys.uni-dortmund.de> Organization: Meyer Consulting X-Mailer: Claws Mail 2.10.0 (GTK+ 2.6.10; i386-apple-darwin8.10.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 28 Nov 2007 19:55:31 +0000 Subject: Re: How to compile 32bit applications on FreeBSD-amd64? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2007 19:03:35 -0000 On Wed, 28 Nov 2007 16:14:26 +0000 (UTC) wb@arb-phys.uni-dortmund.de (W.B. Kloke) wrote: > Is there an easy way to build a 32bit application on an amd64 system? Not really. > #!/bin/sh > /usr/bin/cc -Wl,-m,elf_i386_fbsd,-L,/usr/lib32 > > does not really work, because it tries to link /usr/lib/libgcc.a, crt1.o > and other 64bit programs instead of the right ones. You need to explicitly list all the 32 bit versions of all those 64 bit libraries it's trying to link in. Once you do that, it'll work. There have been notes here indicating that the resulting binary won't run on a 32 bit system because of the differences in library locations, but I haven't verified it. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.