On 2009-Jan-28 11:24:21 -0800, Bakul Shah <ba...@bitblocks.com> wrote: >On a mac, cc -m64 builds 64 bit binaries and cc -m32 builds >32 bit binaries. The following script makes it as easy to do >so on a 64 bit FreeBSD -- at least on the few programs I >tried. Ideally the right magic needs to be folded in gcc's >builtin "specs". > >#!/bin/sh >args=/usr/bin/cc >while [ ".$1" != . ] >do > a=$1; shift > case $a in > -m32) args="$args -B/usr/lib32 -I/usr/include32 -m32";; > *) args="$args $a";; > esac >done >$args
You also need to manually populate /usr/include32 since it doesn't exist by default and may still get bitten by stuff in /usr/local/include. Do you have a script (or installworld patches) to do this? amd64/112215 includes a first attempt at updating the gcc specs (though it's missing the include handling), as well as some of the remaining problems. >Ideally x86_64 platforms run *all* i386 programs (that don't >depend on a 32 bit kernel). Agreed. -- Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour.
pgpEBGdlUAosU.pgp
Description: PGP signature