From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 21 06:02:05 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20BE51065670 for ; Tue, 21 Aug 2012 06:02:05 +0000 (UTC) (envelope-from cbergstrom@pathscale.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id C07688FC12 for ; Tue, 21 Aug 2012 06:02:04 +0000 (UTC) Received: by yhfs35 with SMTP id s35so6779057yhf.13 for ; Mon, 20 Aug 2012 23:02:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=qENIk60zop6XBjI2GR1x6FBM+qbLVmFOmaKLH/r9qi0=; b=gJOgdFWYGT6j0Mp08THrC53AzWBA1eYGocCymgJLCj77gLVdZkwtw8cxKPP8X6nUUv ZpUClQFjLzDkFKrrdSRvoR+tyPeEfMegZpJvUx3LnZAh/VKfm34/9utu0/QmbIEjtvAg hAu1urz9XZjiHMU3CtYU+fqVWr6dpZxl4vyzXn91+svqR754RYX7wnIW3yIi3GI+ZVSp IwBtL3gPMe/14dKIoxWx3JDmM8tGU1LT16yBziZUvUKrt4Q9S2UuUb1oXvaPzaz3ECyX Mqr1koyViNKKhGxKvjkqVg4tV95cf36SCR++hI6SbcwSZubYQiYK9KUt0jS350EwQ4sk giAA== Received: by 10.50.154.165 with SMTP id vp5mr12363852igb.40.1345528923268; Mon, 20 Aug 2012 23:02:03 -0700 (PDT) Received: from [192.168.1.36] (ppp-124-120-194-58.revip2.asianet.co.th. [124.120.194.58]) by mx.google.com with ESMTPS id p5sm4965642igm.13.2012.08.20.23.02.00 (version=SSLv3 cipher=OTHER); Mon, 20 Aug 2012 23:02:02 -0700 (PDT) Message-ID: <503322A0.3080201@pathscale.com> Date: Tue, 21 Aug 2012 12:54:40 +0700 From: =?ISO-8859-1?Q?=22C=2E_Bergstr=F6m=22?= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:6.0.2) Gecko/20111003 Thunderbird/6.0.2 MIME-Version: 1.0 To: Dan McGregor References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQniGnMUBDsk+xu6gqIlNBCwQrUiwFlHeX/nAC79PlqPyeTtZCzt1MXAik5atXaIAFlK99SC Cc: freebsd-hackers@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 06:02:05 -0000 On 08/21/12 09:32 AM, Dan McGregor wrote: > Hi. > > 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. > > amd64 doesn't include i386's machine/foo headers. The included patch > is my proposed solution: > > 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. > > For example machine/ucontext.h will include i386/ucontext.h if > compiled with -m32. > > Thoughts? > > If anyone's curious about the compiler_rt port, I have it at > github.com/dannomac/compiler-rt on the branch named freebsd. Sorry for fencepost comment which may have no/little relevance here Changing the hierarchy to ISA/bits may make cross compiling easier in the future