From owner-freebsd-arch@FreeBSD.ORG Sat Aug 7 09:37:50 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49CBB106564A for ; Sat, 7 Aug 2010 09:37:50 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay008.isp.belgacom.be (mailrelay008.isp.belgacom.be [195.238.6.174]) by mx1.freebsd.org (Postfix) with ESMTP id D7E7F8FC1B for ; Sat, 7 Aug 2010 09:37:49 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEALLEXExbsZwY/2dsb2JhbACgS3LBPIU6BA Received: from 24.156-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.156.24]) by relay.skynet.be with ESMTP; 07 Aug 2010 11:37:46 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.4/8.14.4) with ESMTP id o779bk4Y001567; Sat, 7 Aug 2010 11:37:46 +0200 (CEST) (envelope-from tijl@coosemans.org) From: Tijl Coosemans To: "M. Warner Losh" Date: Sat, 7 Aug 2010 11:37:38 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-PRERELEASE; KDE/4.4.5; i386; ; ) References: <201007291718.12687.tijl@coosemans.org> <20100806.170953.119882392252204233.imp@bsdimp.com> In-Reply-To: <20100806.170953.119882392252204233.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2715759.BhTqe3yHZp"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201008071137.45543.tijl@coosemans.org> Cc: pluknet@gmail.com, freebsd-arch@freebsd.org Subject: Re: Support for cc -m32 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2010 09:37:50 -0000 --nextPart2715759.BhTqe3yHZp Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Saturday 07 August 2010 01:09:53 M. Warner Losh wrote: > In message: <201007291718.12687.tijl@coosemans.org> > Tijl Coosemans 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. > :=20 > : With these patches something like "cc -m32 -o test test.c -pthread -lm" > : generates a program that runs on FreeBSD/i386. > :=20 > : 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 > :=20 > : *cc-m32-1.diff* : Let ld and cc find 32 bit libraries. > :=20 > : *cc-m32-2.diff* : Install i386 headers on amd64. > :=20 > : With this patch headers for a particular $arch are always installed > : under /usr/include/$arch and /usr/include/machine becomes a symlink. >=20 > 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. --nextPart2715759.BhTqe3yHZp Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iF4EABEIAAYFAkxdKWkACgkQfoCS2CCgtitOrwD6AoEyu+6Eb1eWpqki1CHcM/xE lkhEOtRu7oBZjDt3SX4A/RnnGt6taO7wYFXZvjfheO7z+pIKi2dPGTnZEyYA+P7g =1NOz -----END PGP SIGNATURE----- --nextPart2715759.BhTqe3yHZp--