Re: Build 32 bit binaries on amd64

2012-08-23 Thread Konstantin Belousov
On Wed, Aug 22, 2012 at 10:09:27PM +0200, Tijl Coosemans wrote: > On 21-08-2012 17:04, Dan McGregor wrote: > > My solution is certainly fairly hacky, I just took inspiration from > > NetBSD. I wanted to see if it could be done. While I was there I did > > identify several files that should be com

Re: Build 32 bit binaries on amd64

2012-08-22 Thread Dan McGregor
I can't speak for Tijl, but being able to build anything simply by passing -m32 to the compiler is my goal. Did your Intel EFI work involve #defining _KERNEL anywhere? On 22 August 2012 16:04, Eric McCorkle wrote: > I ran into some bugs compiling things with -m32 in the intel EFI work. As > th

Re: Build 32 bit binaries on amd64

2012-08-22 Thread Dan McGregor
On 22 August 2012 14:09, Tijl Coosemans wrote: > On 21-08-2012 17:04, Dan McGregor wrote: >> My solution is certainly fairly hacky, I just took inspiration from >> NetBSD. I wanted to see if it could be done. While I was there I did >> identify several files that should be common between i386 and

Re: Build 32 bit binaries on amd64

2012-08-22 Thread Tijl Coosemans
On 21-08-2012 17:04, Dan McGregor wrote: > My solution is certainly fairly hacky, I just took inspiration from > NetBSD. I wanted to see if it could be done. While I was there I did > identify several files that should be common between i386 and amd64, > such as exec.h. > > Since reading your em

Re: Build 32 bit binaries on amd64

2012-08-22 Thread Warner Losh
On Aug 21, 2012, at 10:34 AM, 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'

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Dan McGregor
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

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Nathan Whitehorn
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 buil

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Dan McGregor
I think I agree now. The more code shared between archtectures the better. I've committed some patches to my github freebsd fork that merge exec.h, asm.h and ucontex.h into x86. I'll probably do more later tonight. On 21 August 2012 07:44, John Baldwin wrote: > On Tuesday, August 21, 2012 4:49

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Dan McGregor
My solution is certainly fairly hacky, I just took inspiration from NetBSD. I wanted to see if it could be done. While I was there I did identify several files that should be common between i386 and amd64, such as exec.h. Since reading your email I started looking at the x86 common code, and have

Re: Build 32 bit binaries on amd64

2012-08-21 Thread John Baldwin
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 t

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Konstantin Belousov
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

Re: Build 32 bit binaries on amd64

2012-08-20 Thread C. Bergström
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 doe