Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jul 2010 13:08:05 +0400
From:      Anonymous <swell.k@gmail.com>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        pluknet@gmail.com, Kohji Okuno <okuno.kohji@jp.panasonic.com>, yaneurabeya@gmail.com, freebsd-current@freebsd.org
Subject:   Re: About 32bit binary on amd64
Message-ID:  <86tyobk6bu.fsf@gmail.com>
In-Reply-To: <20100524103621.GH83316@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 24 May 2010 13:36:21 %2B0300")
References:  <20100524.134955.2300883222251175323.okuno.kohji@jp.panasonic.com> <AANLkTil8H-13it7Rij6eETImyiB1pmjZYx7V5SafIc-0@mail.gmail.com> <3A68039C-BECD-47C0-89EE-45E3FB7C8D90@gmail.com> <20100524.185856.2300883222251249895.okuno.kohji@jp.panasonic.com> <20100524103621.GH83316@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Kostik Belousov <kostikbel@gmail.com> 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 ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86tyobk6bu.fsf>