From owner-freebsd-current@FreeBSD.ORG Mon May 24 10:36:25 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12BD1065742 for ; Mon, 24 May 2010 10:36:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 60B318FC1B for ; Mon, 24 May 2010 10:36:24 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o4OAaYTA051665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 May 2010 13:36:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o4OAaLFW063787; Mon, 24 May 2010 13:36:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o4OAaLcx063786; Mon, 24 May 2010 13:36:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 24 May 2010 13:36:21 +0300 From: Kostik Belousov To: Kohji Okuno Message-ID: <20100524103621.GH83316@deviant.kiev.zoral.com.ua> References: <20100524.134955.2300883222251175323.okuno.kohji@jp.panasonic.com> <3A68039C-BECD-47C0-89EE-45E3FB7C8D90@gmail.com> <20100524.185856.2300883222251249895.okuno.kohji@jp.panasonic.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K2ilJF7ocWQIPRKZ" Content-Disposition: inline In-Reply-To: <20100524.185856.2300883222251249895.okuno.kohji@jp.panasonic.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: pluknet@gmail.com, yaneurabeya@gmail.com, freebsd-current@freebsd.org Subject: Re: About 32bit binary on amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2010 10:36:25 -0000 --K2ilJF7ocWQIPRKZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 24, 2010 at 06:58:56PM +0900, Kohji Okuno wrote: > Thank you for your comments. >=20 > In my usage, it works good by the patch appended to this mail. The patch is probably a start in the right direction. But, it would be much better to install sys/i386/include to e.g. /usr/include/machine32 and use the pristine i386 files instead of copying them. Are you interested in going further with the approach ? Thanks. >=20 > > On May 24, 2010, at 2:49 AM, pluknet wrote: > >=20 > >> On 24 May 2010 08:49, Kohji Okuno wrote: > >>> Hi all, > >>>=20 > >>> I want to compile 32bit binary on amd64, but I met with the problem. > >>> Could you teach me the best solution, please? > >>>=20 > >>>=20 > >>> My environment is FreeBSD 8.1-PRERELEASE #0: Tue May 18 12:01:26 JST = 2010. > >>>=20 > >>> I compiled and executed test.c as below on amd64. > >>>=20 > >> [...] > >>>=20 > >>> % gcc -m32 -B/usr/lib32 test.c > >>> % ./a.out > >>> mmap: Invalid argument > >>=20 > >> AFAIK, it still doesn't work on FreeBSD. You need something like 32bit > >> chroot environment. > >> There's also about: > >> http://www.freebsd.org/projects/ideas/#p-freebsd-amd64-gcc-m32 > >=20 > > -m32 is busted on FreeBSD; I don't remember the full details but I thin= k it had something to do with the linking stage of things... > > Thanks, > > -Garrett > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --K2ilJF7ocWQIPRKZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkv6VqQACgkQC3+MBN1Mb4i+CwCgkyBodZh0lO0ek4cf4YDQsJwF IoYAoJHBxpqjuBRbSnn7PgMhBd+cdgjy =t8UG -----END PGP SIGNATURE----- --K2ilJF7ocWQIPRKZ--