From owner-freebsd-stable@FreeBSD.ORG Mon Mar 14 23:16:49 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C826106567B for ; Mon, 14 Mar 2011 23:16:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id C2B7D8FC13 for ; Mon, 14 Mar 2011 23:16:48 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:2554:6d65:cb5e:4fee] (unknown [IPv6:2001:7b8:3a7:0:2554:6d65:cb5e:4fee]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7F1DD5C59; Tue, 15 Mar 2011 00:16:47 +0100 (CET) Message-ID: <4D7EA1D9.3060602@FreeBSD.org> Date: Tue, 15 Mar 2011 00:16:41 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.16pre) Gecko/20110312 Lanikai/3.1.10pre MIME-Version: 1.0 To: Thomas David Rivers References: <201103092015.p29KFd0U077849@dave.dignus.com> In-Reply-To: <201103092015.p29KFd0U077849@dave.dignus.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: bin/139146 still not right in FreeBSD 8.2 (-m32 on amd64)? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 23:16:49 -0000 On 2011-03-09 21:15, Thomas David Rivers wrote: > Just installed a fresh 8.2-stable on a brand-spanking-new 64-bit > machine... > > But, when I try to build 32-bit programs I get problems linking, > and I stumbled onto PR bin/139146. ... > /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc > /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc > /usr/bin/ld: cannot find -lgcc I committed a fix for this in r219648, so at least: - gcc -m32 uses the correct library path to find crt startup objects - ld uses the correct library path to find libraries - simple 'hello world' type programs link and run However, this does *not* solve the problem completely, as the system headers in /usr/include/machine will still be amd64 specific. This can result in various kinds of brokenness. Please be careful. If you want to reliably build i386 executables, you should still use a native i386 installation.