From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 30 18:10:59 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6380116A468 for ; Mon, 30 Jul 2007 18:10:59 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id ABC3C13C474 for ; Mon, 30 Jul 2007 18:10:58 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile.ondsl.gr [83.235.244.135]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l6UHt7Z2022379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 30 Jul 2007 20:55:16 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l6UHsoDY040245; Mon, 30 Jul 2007 20:55:06 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l6UHsn0F040243; Mon, 30 Jul 2007 20:54:49 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 30 Jul 2007 20:54:48 +0300 From: Giorgos Keramidas To: Tom Evans Message-ID: <20070730175448.GA40191@kobe.laptop> References: <200707271513.48639.sharadc@niksun.com> <20070727102027.GH1152@turion.vk2pj.dyndns.org> <1185553955.1457.8.camel@localhost> <20070728075553.GW1152@turion.vk2pj.dyndns.org> <1185783883.1444.3.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1185783883.1444.3.camel@localhost> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.894, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.51, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: FreeBSD Hackers Subject: Re: gcc -m32 option on amd64. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2007 18:10:59 -0000 On 2007-07-30 09:24, Tom Evans wrote: >On Sat, 2007-07-28 at 17:55 +1000, Peter Jeremy wrote: >> On 2007-Jul-27 17:32:35 +0100, Tom Evans wrote: >> >gcc on amd64 is capable of generating i386 code, but ld on amd64 is >> >incapable of linking i386 code together without serious amounts of work. >> >> Can you elaborate on what you mean by "incapable of linking i386 code"? >> The stock ld can definitely link i386 code: >> turion% ld -V >> GNU ld version 2.15 [FreeBSD] 2004-05-23 >> Supported emulations: >> elf_i386_fbsd >> elf_x86_64_fbsd >> turion% >> >> There is a problem that the 32-bit pathnames on FreeBSD/amd64 are >> different to the 32-bit pathnames on FreeBSD/i386 (ie an i386 >> executable built on amd64 will point to /libexec/ld-elf32.so.1, >> rather than /libexec/ld-elf.so.1) so the result won't execute on a >> FreeBSD/i386 box - but I don't see that as a problem with ld, rather >> the configuration. > > Sure. By 'incapable of linking i386 code' I mean that the default > toolchain of gcc invoking ld to assemble libraries and object files > into executables is incapable of doing so when compiling i386 code. I > say without serious amounts of work because, as you point out, it is > possible to do. The default toolchain can link 32-bit code with -B /usr/lib32 path options. This should work fine for the base system binaries. I expect ports compiled without -B will not cooperate very 'smoothly' with 32-bit port builds, but that's a different thing from being completely incapable, I guess. > Any other english sentences you need explaining? That's a bit too harsh. The FreeBSD people are known for their civilized manners, so can we tone things down a bit everyone? :-)