Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Aug 2010 17:09:53 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        tijl@coosemans.org
Cc:        pluknet@gmail.com, freebsd-arch@freebsd.org
Subject:   Re: Support for cc -m32
Message-ID:  <20100806.170953.119882392252204233.imp@bsdimp.com>
In-Reply-To: <201007291718.12687.tijl@coosemans.org>
References:  <201007291718.12687.tijl@coosemans.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <201007291718.12687.tijl@coosemans.org>
            Tijl Coosemans <tijl@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



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