Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Aug 2010 11:37:38 +0200
From:      Tijl Coosemans <tijl@coosemans.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        pluknet@gmail.com, freebsd-arch@freebsd.org
Subject:   Re: Support for cc -m32
Message-ID:  <201008071137.45543.tijl@coosemans.org>
In-Reply-To: <20100806.170953.119882392252204233.imp@bsdimp.com>
References:  <201007291718.12687.tijl@coosemans.org> <20100806.170953.119882392252204233.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <tijl@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.
> :=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--



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