About 32bit binary on amd64
Anonymous
swell.k at gmail.com
Wed Jul 7 09:08:17 UTC 2010
Kostik Belousov <kostikbel at 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 ?
More information about the freebsd-current
mailing list