From owner-freebsd-questions@FreeBSD.ORG Mon Oct 4 22:58:00 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47496106566C for ; Mon, 4 Oct 2010 22:58:00 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id 013B78FC14 for ; Mon, 4 Oct 2010 22:57:59 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o94MvwQT044080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 4 Oct 2010 17:57:59 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id o94Mvwgu069977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 4 Oct 2010 17:57:58 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.4/Submit) id o94Mvvba069976; Mon, 4 Oct 2010 17:57:57 -0500 (CDT) (envelope-from dan) Date: Mon, 4 Oct 2010 17:57:57 -0500 From: Dan Nelson To: David Brodbeck Message-ID: <20101004225757.GK40148@dan.emsphone.com> References: <4CAA3030.3090001@emailrob.com> <4CAA3CFE.1060609@emailrob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.1-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.96 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Mon, 04 Oct 2010 17:57:59 -0500 (CDT) X-Scanned-By: MIMEDefang 2.45 Cc: fbsd_questions , spellberg_robert Subject: Re: [fbsd_questions] i386 vs amd64, on intel_64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 22:58:00 -0000 In the last episode (Oct 04), David Brodbeck said: > On a 64-bit system, if you build a binary with the -m32 flag, it > should run on both i386 and x86-64 systems. A binary built with -m64 > will only run on x86-64. Does that help? Actually, -m32 on amd64 won't generate usable binaries, since /usr/include/machine/* are all amd64 headers and you end up with things like struct FILE with wrong-size elements. There was a thread a few weeks ago discussing this. If you need to generate 32-bit executables, you'll need to do it inside an all-32-bit chroot or a virtual machine. -- Dan Nelson dnelson@allantgroup.com