From nobody@FreeBSD.org  Fri May  9 14:18:23 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BE9CF106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  9 May 2008 14:18:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 77F968FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  9 May 2008 14:18:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m49EHOHa049748
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 9 May 2008 14:17:24 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m49EHO88049747;
	Fri, 9 May 2008 14:17:24 GMT
	(envelope-from nobody)
Message-Id: <200805091417.m49EHO88049747@www.freebsd.org>
Date: Fri, 9 May 2008 14:17:24 GMT
From: Peter Keel <peter.keel@hostpoint.ch>
To: freebsd-gnats-submit@FreeBSD.org
Subject: buildworld with TARGET_ARCH=i386 fails on amd64 in jail
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123554
>Category:       misc
>Synopsis:       [build] buildworld with TARGET_ARCH=i386 fails on amd64 in jail
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 09 14:20:04 UTC 2008
>Closed-Date:    
>Last-Modified:  Wed Dec 24 15:50:01 UTC 2008
>Originator:     Peter Keel
>Release:        6.3
>Organization:
Hostpoint AG
>Environment:
FreeBSD porti386-632.adm.hostpoint.ch 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #0: Wed Feb 27 15:57:51 UTC 2008     root@porta64-63.adm.hostpoint.ch:/usr/obj/usr/src/sys/SMP-IPFW  amd64

>Description:
I've setup a Jail with a 32bit FreeBSD 6.3 on a i386 machine, which I transferred onto an amd64 machine (also FreeBSD 6.3). 

Kernel still builds fine, even with no TARGET_ARCH set, as do various ports. But buildworld does not: 

root@porti386-632 [/usr/src]# make buildworld TARGET_ARCH=i386

--------------------------------------------------------------
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Thierry Herbelot <thierry.herbelot@free.fr>
To: bug-followup@freebsd.org, peter.keel@hostpoint.ch
Cc:  
Subject: Re: misc/123554: [build] buildworld with TARGET_ARCH=i386 fails on amd64 in jail
Date: Wed, 24 Dec 2008 16:08:13 +0100

 Hello,
 
 as a follow-up : the build can proceed with this in /etc/make.conf :
 TARGET_ARCH=i386
 MACHINE_ARCH=amd64
 
 to acknowledge that the build machine is an amd64, as checked in line 155 
 of /usr/src/Makefile.inc1
 
 	TfH
>Unformatted:
 >>> Building an up-to-date make(1)
 --------------------------------------------------------------
 sh /usr/src/tools/install.sh -s -o root -g wheel -m 555   make /usr/obj/usr/src/make.i386
 "/usr/src/Makefile.inc1", line 149: To cross-build, set TARGET_ARCH.
 *** Error code 1
 
 Seems to me to be a Bug in /usr/src/Makefile.inc1
 
