From owner-freebsd-arch@FreeBSD.ORG Wed Nov 17 17:21:15 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EB4A10658AF; Wed, 17 Nov 2010 17:21:15 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id CD2EF8FC18; Wed, 17 Nov 2010 17:21:14 +0000 (UTC) Received: by eyb7 with SMTP id 7so1334168eyb.13 for ; Wed, 17 Nov 2010 09:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=LtrSIAd913E/re5SkDS9VwsdEjIGl9RPI1o5ojmCPiU=; b=HteWG2XBrvkddWHvNMCkyeLMSEaE1n4iQqngnRK3aQk06+uOD8BwSKhNn4sXVd/GiJ of8TFJskMCmYFUXtv/gJL8kYdnPSJK04/6S9myj1T+KXMzty1+8tnQQcAQnXDHTL1uGe qg7zSlCWwIjVViLfEsi1X45MdgKzlVBefBi9c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=jfdakuw4USVAkrxyecUKk7NB+5MC7IBJifJRQczDedZMteRj3F5qs3epjd0QU87X+B aAUX5ru7/P21+G1s5Xlx2M2rGdHBbAsWwLEONWJK+TA47OUfULg6qFBfNMpZA6QSpvum 7uzqaa7cryPKaBA0UmnvBoK82UfMg9Yj55VJ8= MIME-Version: 1.0 Received: by 10.216.82.197 with SMTP id o47mr9073384wee.45.1290014473067; Wed, 17 Nov 2010 09:21:13 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Wed, 17 Nov 2010 09:21:12 -0800 (PST) In-Reply-To: <4CE3C86D.3060501@FreeBSD.org> References: <201007291718.12687.tijl@coosemans.org> <201008301731.19074.tijl@coosemans.org> <20100830.123636.59640143160044949.imp@bsdimp.com> <201008302210.07110.tijl@coosemans.org> <4CE3C86D.3060501@FreeBSD.org> Date: Wed, 17 Nov 2010 09:21:12 -0800 X-Google-Sender-Auth: XB81vR5gjc1oDomoXY-TYPdrn_o Message-ID: From: Garrett Cooper To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, Tijl Coosemans , Warner Losh Subject: Re: Support for cc -m32 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:21:15 -0000 On Wed, Nov 17, 2010 at 4:19 AM, Dimitry Andric wrote: > On 2010-08-30 22:09, Tijl Coosemans wrote: >> >> On Monday 30 August 2010 20:36:36 M. Warner Losh wrote: >>> >>> :> =A0http://people.freebsd.org/~tijl/cc-m32-1.diff >>> :> =A0http://people.freebsd.org/~tijl/cc-m32-2.diff >>> :> =A0http://people.freebsd.org/~tijl/cc-m32-3.diff >>> :> >>> :> =A0*cc-m32-1.diff* : Let ld and cc find 32 bit libraries. > > ... >>> >>> I have been trying to get the tbemd patches into the tree and these >>> patches conflict with them. =A0Can we hold off until I get them in? >>> I've had to rebase things myself a dozen times and each time I've only >>> been able to get part of the patches in... >>> >>> I still have the objections from before, but I'll take a look at the >>> new patches to see if they are addressed or not. >> >> Ok, no problem. > > Could we please commit that first diff, at least? =A0As it is now, -m32 > cannot even produce 'hello world', so it will only be an improvement. > It doesn't seem to clash with tbemd changes either. > > This will also help with binutils 2.17 and certain ports, such as > valgrind. =A0Apparently our current ld just warns about arch mismatch, bu= t > produces a .so file anyway (!!): > > ... > cc -L/usr/lib32 -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow > -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations > -Wno-format-zero-length -fno-strict-aliasing -fpic -O -g > -fno-omit-frame-pointer -fno-strict-aliasing -Wno-long-long -O2 -pipe > -fno-strict-aliasing -Wno-pointer-sign -fno-stack-protector -nodefaultlib= s > -shared -Wl,-z,interpose,-z,initfirst -L/usr/lib32 -m32 =A0-o > vgpreload_core-x86-freebsd.so vgpreload_core_x86_freebsd_so-vg_preloaded.= o > /usr/bin/ld: warning: i386:x86-64 architecture of input file > `/usr/lib/crti.o' is incompatible with i386 output > /usr/bin/ld: warning: i386:x86-64 architecture of input file > `/usr/lib/crtbeginS.o' is incompatible with i386 output > /usr/bin/ld: warning: i386:x86-64 architecture of input file > `/usr/lib/crtendS.o' is incompatible with i386 output > /usr/bin/ld: warning: i386:x86-64 architecture of input file > `/usr/lib/crtn.o' is incompatible with i386 output > > But in later versions of ld this was changed to a (more appropriate) > fatal error. :) > > Of course the 2nd and 3rd diffs mess around with headers and such, so > they'll need more scrutiny, but the first one should be no problem, > IMHO. I'm sensing that Warner is getting closer to an official solution because a chunk of the tbemd code hit the tree in this past week and a half. So I would hold off on committing that code. Thanks, -Garrett