From owner-freebsd-current@FreeBSD.ORG Wed Jul 7 09:08:17 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 6265D106564A for ; Wed, 7 Jul 2010 09:08:17 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id E39B08FC0C for ; Wed, 7 Jul 2010 09:08:16 +0000 (UTC) Received: by wyb34 with SMTP id 34so4349169wyb.13 for ; Wed, 07 Jul 2010 02:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=jdplaao5XKbS6PMHOIgqunkox4MswayLg0S8DbE2cAQ=; b=ldhUeyCI5kDV3eJVg5DvLWZWmN5y52JwoOmletpW6HP0NaBYiGDeZtHdXzbU4h9SKO jJeUCrz31YrKC4xbWOMo46F6EQLFG8PBa5cXA5kp5LTQTzWXjxYDPf0h5/7U666uz/Rq Cd0SSkrqkicDwxb/pU4O2YGl0lzFRl/YY3kAM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=dDYqsKv3GWwxnAbCk6S9ysOKfcwv7NKUCEhYosldwFOopGgMppO5mC5GR4dvAzjBZL CCUrfM5QCLOWOK5ULOXw8E761lPUl3gmqRYAR+jSnVpFwgMXPlMuwKHvijokJtsBr+YM MAlfIH0trefj32gnSCH1SbWxo+rZvkSwlYmps= Received: by 10.227.144.1 with SMTP id x1mr4657054wbu.199.1278493694577; Wed, 07 Jul 2010 02:08:14 -0700 (PDT) Received: from localhost (server51262.uk2net.com [83.170.92.9]) by mx.google.com with ESMTPS id a1sm41430750wbb.14.2010.07.07.02.08.11 (version=SSLv3 cipher=RC4-MD5); Wed, 07 Jul 2010 02:08:13 -0700 (PDT) From: Anonymous To: Kostik Belousov References: <20100524.134955.2300883222251175323.okuno.kohji@jp.panasonic.com> <3A68039C-BECD-47C0-89EE-45E3FB7C8D90@gmail.com> <20100524.185856.2300883222251249895.okuno.kohji@jp.panasonic.com> <20100524103621.GH83316@deviant.kiev.zoral.com.ua> Date: Wed, 07 Jul 2010 13:08:05 +0400 In-Reply-To: <20100524103621.GH83316@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 24 May 2010 13:36:21 +0300") Message-ID: <86tyobk6bu.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: pluknet@gmail.com, Kohji Okuno , 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: Wed, 07 Jul 2010 09:08:17 -0000 Kostik Belousov writes: > On Mon, May 24, 2010 at 06:58:56PM +0900, Kohji Okuno wrote: >> Thank you for your comments. >> >> 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. I think it'd be much easier to use smth like /usr/include/i386/machine. So one can shadow /usr/include/machine from cc/c++ wrapper. #! /bin/sh skip-path() { local IFS=: PATH=$(for p in $PATH; do case $p in $1) ;; *) echo -n $p: ;; esac done) } skip-path "*${0%/*}" exec ${0##*/} -m32 -B/usr/lib32 -isystem/usr/include/i386 "$@" Tested only on simple ports like lang/python26 with no deps, e.g. # here you should put above cc/c++ wrapper into ~/.wrap32/cc $ (cd ~/.wrap32; for f in c++ gcc g++; do ln -s cc $f; done) $ export PATH=$HOME/.wrap32:$PATH $ cd lang/python26 $ make install > > Are you interested in going further with the approach ?