From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 22 02:25:23 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 46558106564A; Wed, 22 Aug 2012 02:25:23 +0000 (UTC) (envelope-from danismostlikely@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9C92A8FC17; Wed, 22 Aug 2012 02:25:22 +0000 (UTC) Received: by vbmv11 with SMTP id v11so701702vbm.13 for ; Tue, 21 Aug 2012 19:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nRJZRWS5CM8Zndn0aMcG0zZk22aRPsMKmGkCB05rgwM=; b=k28gMbYbbDvGEzdP7SdlvaapYUGxcDznwVlJTYhmVV2FHU0f4GbUKevKJEr4s3Li9B GMEEE07uCy2lgkqV9NFfz3Z1Ua6aGnwTqzXJUY0GSN7bplh5VUJi3jmbpYQ/8WmY3w75 2+7eZndZdVCKosVDtvAKUtedrEcd21h2XVDbaERwRB2J2YL9KNEQzF+DeNbW/yC4BHbP hrHNt1BfYlOsoo5uAUJ/6tizfUNjKJXwvzWDpNqTDiZ4a1do/CM7rkDEwp/BR5lZEQDW Y154zoEnvc/LJO7uJO6wSdtubSY66rEvAOcNpdRan8YYBoW4bhXbq34avOLzY6KDkBtq ZdZQ== MIME-Version: 1.0 Received: by 10.52.67.7 with SMTP id j7mr13070586vdt.91.1345602321493; Tue, 21 Aug 2012 19:25:21 -0700 (PDT) Received: by 10.58.91.169 with HTTP; Tue, 21 Aug 2012 19:25:21 -0700 (PDT) In-Reply-To: <5033B89C.7070201@freebsd.org> References: <20120821084930.GM33100@deviant.kiev.zoral.com.ua> <201208210944.31001.jhb@freebsd.org> <5033B89C.7070201@freebsd.org> Date: Tue, 21 Aug 2012 20:25:21 -0600 Message-ID: From: Dan McGregor To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Cc: Konstantin Belousov , 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: Wed, 22 Aug 2012 02:25:23 -0000 How do the unified powerpc headers work? Is it just one architecture for both PowerPC and 64 bit PowerPC? If so, was that tijl's ultimate goal? One architecture for i386 and AMD64? On the unifying headers front, I've make a bunch of progress towards merging i386 and amd64 headers into x86; also available on github. Dan On 21 August 2012 10:34, Nathan Whitehorn wrote: > On 08/21/12 08:44, John Baldwin wrote: >> >> On Tuesday, August 21, 2012 4:49:30 am Konstantin Belousov wrote: >>> >>> On Mon, Aug 20, 2012 at 08:32:41PM -0600, 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. >>> >>> 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 ? >> >> I think we should probably follow Tijl's model since we are on that path. >> I originally preferred the /usr/include/i386 approach, but have come >> around >> to Tjil's approach instead. >> > > I just wanted to add that the unified 32/64 header route is where we went on > PowerPC (and MIPS?) and it works very well for -m32. > -Nathan > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"