Support for cc -m32

Tijl Coosemans tijl at coosemans.org
Sat Aug 7 09:37:50 UTC 2010


On Saturday 07 August 2010 01:09:53 M. Warner Losh wrote:
> In message: <201007291718.12687.tijl at coosemans.org>
>             Tijl Coosemans <tijl at coosemans.org> writes:
> : I've put the initial version of some patches online to support cross
> : compilation of 32 bit binaries on amd64. It's modelled after how NetBSD
> : does this.
> : 
> : With these patches something like "cc -m32 -o test test.c -pthread -lm"
> : generates a program that runs on FreeBSD/i386.
> : 
> : http://people.freebsd.org/~tijl/cc-m32-1.diff
> : http://people.freebsd.org/~tijl/cc-m32-2.diff
> : http://people.freebsd.org/~tijl/cc-m32-3.diff
> : 
> : *cc-m32-1.diff* : Let ld and cc find 32 bit libraries.
> : 
> : *cc-m32-2.diff* : Install i386 headers on amd64.
> : 
> : With this patch headers for a particular $arch are always installed
> : under /usr/include/$arch and /usr/include/machine becomes a symlink.
> 
> This patch is wrong.  /usr/include/machine is for
> sys/$MACHINE/include, not for sys/$MACHINE_ARCH/include.  These can
> (and will) be different.  Today in the pc98/i386 case, but in the
> future in the mipsel/mips, mipseb/mips and armeb/arm cases.

Could you clarify this somewhat? I think the patch already does that.
It installs headers for ${MACHINE} under /usr/include/${MACHINE},
headers for ${MACHINE_ARCH} (when different from ${MACHINE}) under
/usr/include/${MACHINE_ARCH} and symlinks /usr/include/machine to
/usr/include/${MACHINE}. On amd64 it also installs i386 headers under
/usr/include/i386.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20100807/81b183bb/attachment.pgp


More information about the freebsd-arch mailing list