Support for cc -m32
M. Warner Losh
imp at bsdimp.com
Fri Aug 6 23:17:12 UTC 2010
In message: <201007291718.12687.tijl at coosemans.org>
Tijl Coosemans <tijl at coosemans.org> writes:
: Hi,
:
: 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.
Warner
More information about the freebsd-arch
mailing list