From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 21 08:49:35 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51601106566B; Tue, 21 Aug 2012 08:49:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BD9658FC08; Tue, 21 Aug 2012 08:49:34 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7L8ngJU020728; Tue, 21 Aug 2012 11:49:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7L8nUvd094114; Tue, 21 Aug 2012 11:49:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7L8nUbd094112; Tue, 21 Aug 2012 11:49:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 21 Aug 2012 11:49:30 +0300 From: Konstantin Belousov To: Dan McGregor Message-ID: <20120821084930.GM33100@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AfkfStYJxYILZKr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org, tijl@freebsd.org Subject: Re: Build 32 bit binaries on amd64 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 08:49:35 -0000 --7AfkfStYJxYILZKr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 20, 2012 at 08:32:41PM -0600, Dan McGregor wrote: > Hi. >=20 > I've been working on porting compiler-rt/clang's support for address > sanitization (asan) to FreeBSD. So far I have it building and it > appears to work properly, however the build system expects to be able > to build 32 bit binaries on amd64. >=20 > amd64 doesn't include i386's machine/foo headers. The included patch > is my proposed solution: >=20 > Add i386 headers to /usr/include/i386, and in machine/foo.h, check if > it's a 32 bit build and include the appropriate header from i386. >=20 > For example machine/ucontext.h will include i386/ucontext.h if > compiled with -m32. >=20 > Thoughts? >=20 > If anyone's curious about the compiler_rt port, I have it at > github.com/dannomac/compiler-rt on the branch named freebsd. There was a work by Tijl Coosemans in the similar, but somewhat less hacky direction. The headers are moved into sys/x86/include and unified as much as possible, while machine/ counterpart includes corresponding header from x86/include. I even lost track of how much more headers is left to convert. In fact, not all headers are equal, some are only useful for kernel or base system. Also, parts of the critically important headers do not live in machine/ at all, e.g. the headers from libm. The work seems to be stale, do you want to cooperate with Tijl or continue ? --7AfkfStYJxYILZKr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlAzS5oACgkQC3+MBN1Mb4hWrgCgsCOsNwhlsZcSYp1G106H+BXw QxUAn3qLfkvdz5dxtwQ/Cd9xqNaEnhJ3 =3lf8 -----END PGP SIGNATURE----- --7AfkfStYJxYILZKr--