diff options
author | 2007-11-28 18:25:10 +0000 | |
---|---|---|
committer | 2007-11-28 18:25:10 +0000 | |
commit | 510408b1fcc0f9790e2dfd7a69fe0c69fd9660cc (patch) | |
tree | f90fbce88493a19e8958c16909be669f38e4ae02 /sys | |
parent | use sizeof (buf) instead of hardcoded value (diff) | |
download | wireguard-openbsd-510408b1fcc0f9790e2dfd7a69fe0c69fd9660cc.tar.xz wireguard-openbsd-510408b1fcc0f9790e2dfd7a69fe0c69fd9660cc.zip |
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')
-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} |