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
;>>> 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 o

Re: Build 32 bit binaries on amd64

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

Re: Build 32 bit binaries on amd64

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

Re: Build 32 bit binaries on amd64

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

Re: Build 32 bit binaries on amd64

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

Re: Build 32 bit binaries on amd64

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

Re: Build 32 bit binaries on amd64

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

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 amd

Build 32 bit binaries on amd64

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