From owner-freebsd-arch@FreeBSD.ORG Wed Nov 26 21:56:50 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0BBDFC9; Wed, 26 Nov 2014 21:56:50 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFA9898E; Wed, 26 Nov 2014 21:56:50 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 464B61928D6; Wed, 26 Nov 2014 21:56:49 +0000 (UTC) Message-ID: <1417039008.4680.6.camel@ignoranthack.me> Subject: Re: How is MACHINE_ARCH dervived by make? From: Sean Bruno Reply-To: sbruno@freebsd.org To: Garrett Cooper Date: Wed, 26 Nov 2014 13:56:48 -0800 In-Reply-To: <6BCC0757-6BAD-4D3F-A606-414478112143@gmail.com> References: <1417037830.4680.4.camel@ignoranthack.me> <6BCC0757-6BAD-4D3F-A606-414478112143@gmail.com> Content-Type: text/plain; charset="iso-8859-7" X-Mailer: Evolution 3.12.7 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 21:56:51 -0000 On Wed, 2014-11-26 at 13:41 -0800, Garrett Cooper wrote: > On Nov 26, 2014, at 13:37, Sean Bruno wrote: > > > I have yet to find the magic bit in the build sys that causes ports to > > go off and think that I'm building for amd64. Building on a real amd64 > > box inside of an emulated jail via qemu and I still am getting tripped > > up by something in our system thinking that I want amd64 as the > > MACHINE_ARCH. > > It˘s handled in bmake/make. If you need to crossbuild, you˘ll probably need to tell make what your MACHINE_ARCH/MACHINE is. > Please refer to the manpages for more details. > Cheers! > Hrm, man make doesn't bring up the bmake man page (on current). If it *did* I would have seen the MACHINE_ARCH comments that allow overrides. Odd. > $ grep -rl MACHINE_ARCH contrib/bmake/ usr.bin/make | grep '\.c$' > contrib/bmake/main.c > contrib/bmake/arch.c > usr.bin/make/main.c > Looking now ... it sort of looks like there is some shell script hackery to do this at build time that depends on uname in machine.sh and os.sh sean