Build 32 bit binaries on amd64

Dan McGregor dan.mcgregor at usask.ca
Tue Aug 21 03:32:49 UTC 2012


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.

Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-modify-amd64-headers-to-include-i386-versions-if-__x.patch
Type: text/x-patch
Size: 22411 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120821/1216c11c/0001-modify-amd64-headers-to-include-i386-versions-if-__x.bin


More information about the freebsd-hackers mailing list