From owner-freebsd-current@FreeBSD.ORG Fri Jun 13 15:01:22 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58B6F27D for ; Fri, 13 Jun 2014 15:01:22 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 329C424CA for ; Fri, 13 Jun 2014 15:01:22 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4C238B9C9; Fri, 13 Jun 2014 11:01:21 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: building i386 kernel on amd64 host Date: Fri, 13 Jun 2014 10:59:01 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201406131059.01450.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 13 Jun 2014 11:01:21 -0400 (EDT) Cc: Oliver Pinter X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 15:01:22 -0000 On Friday, June 13, 2014 6:21:28 am Oliver Pinter wrote: > Hi All! > > When I try to build i386 kernel on amd64 host running compile error > due wrong cpufunc.h picked up by build system. > > I used the attached script to build the kernel, and I attached a build log. > > Any suggestion how can I fix this? To build an i386 kernel on an amd64 host do this: cd /usr/src (or some other tree) make TARGET=i386 kernel-toolchain make TARGET=i386 buildkernel make TARGET=i386 installkernel DESTDIR=/some/place And your i386 kernel will end up in /some/place/boot/kernel/kernel. (You can set things like KERNCONF to pick an alternate kernel config just as with normal 'make buildkernel'.) (Your attachment was size zero for me btw) -- John Baldwin