diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2007-11-28 18:25:11 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2007-11-28 18:25:11 +0000 |
commit | dd78246c073cab81c4852fe29696bf413d57169b (patch) | |
tree | bf36e40331c83b72b98608c2ac4456385eef8eac /sys/arch/i386 | |
parent | e7d4f489f7080cae14807710d9ae988d0799381c (diff) |
basic support for building an i386 kernel with the native toolchain
on amd64. helpful for test compiling. i have not attempted to boot
such a kernel. you shouldn't either.
ok deraadt
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/conf/Makefile.i386 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index 6b33f326b96..c40a81ea143 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.i386,v 1.49 2007/11/25 18:25:28 deraadt Exp $ +# $OpenBSD: Makefile.i386,v 1.50 2007/11/28 18:25:10 tedu Exp $ # Makefile for OpenBSD # @@ -50,6 +50,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE LINKFLAGS= -Ttext 0xD0200120 -e start -N --warn-common STRIPFLAGS= -g -X -x +.if ${MACHINE} == "amd64" +CFLAGS+=-m32 +AFLAGS+=-m32 +LINKFLAGS+=-melf_i386_obsd +.endif + HOSTCC= ${CC} HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} HOSTED_CFLAGS= ${CFLAGS} |