From owner-freebsd-arch@FreeBSD.ORG Wed Nov 26 23:26:42 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7AAFC3C; Wed, 26 Nov 2014 23:26:42 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bn0103.outbound.protection.outlook.com [157.56.110.103]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4685D2BB; Wed, 26 Nov 2014 23:26:41 +0000 (UTC) Received: from BLUPR05CA0050.namprd05.prod.outlook.com (10.141.20.20) by BN1PR05MB438.namprd05.prod.outlook.com (10.141.58.12) with Microsoft SMTP Server (TLS) id 15.1.26.15; Wed, 26 Nov 2014 23:26:33 +0000 Received: from BY2FFO11FD021.protection.gbl (2a01:111:f400:7c0c::173) by BLUPR05CA0050.outlook.office365.com (2a01:111:e400:855::20) with Microsoft SMTP Server (TLS) id 15.1.26.15 via Frontend Transport; Wed, 26 Nov 2014 23:26:33 +0000 Received: from P-EMF03-SAC.jnpr.net (66.129.239.17) by BY2FFO11FD021.mail.protection.outlook.com (10.1.15.210) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Wed, 26 Nov 2014 23:26:32 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF03-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Wed, 26 Nov 2014 15:26:32 -0800 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id sAQNQVR38922; Wed, 26 Nov 2014 15:26:31 -0800 (PST) (envelope-from sjg@juniper.net) Received: from chaos (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 3ED81580A3; Wed, 26 Nov 2014 15:26:31 -0800 (PST) To: Subject: Re: How is MACHINE_ARCH dervived by make? In-Reply-To: <1417039008.4680.6.camel@ignoranthack.me> References: <1417037830.4680.4.camel@ignoranthack.me> <6BCC0757-6BAD-4D3F-A606-414478112143@gmail.com> <1417039008.4680.6.camel@ignoranthack.me> Comments: In-reply-to: Sean Bruno message dated "Wed, 26 Nov 2014 13:56:48 -0800." From: "Simon J. Gerraty" X-Mailer: MH-E 8.0.3; nmh 1.3; GNU Emacs 22.3.1 Date: Wed, 26 Nov 2014 15:26:31 -0800 Message-ID: <9302.1417044391@chaos> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.17; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(979002)(6009001)(51704005)(199003)(24454002)(189002)(76176999)(97736003)(57986006)(117636001)(50986999)(76506005)(46102003)(110136001)(86362001)(93916002)(92726001)(92566001)(20776003)(47776003)(64706001)(89996001)(95666004)(87936001)(31966008)(88136002)(69596002)(104166001)(68736004)(107046002)(2351001)(99396003)(120916001)(44976005)(6806004)(19580405001)(19580395003)(81156004)(106466001)(105596002)(21056001)(102836001)(84676001)(33716001)(4396001)(50226001)(48376002)(50466002)(87286001)(62966003)(77156002)(42262002)(62816006)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR05MB438; H:P-EMF03-SAC.jnpr.net; FPR:; SPF:SoftFail; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB438; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB438; X-Forefront-PRVS: 04073E895A Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.17 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.17) smtp.mailfrom=sjg@juniper.net; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB438; X-OriginatorOrg: juniper.net Cc: Garrett Cooper , 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 23:26:42 -0000 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 When you run make, if MACHINE, MACHINE_ARCH etc are not set in environment make will ask the kernel. > 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 You can ignore all that - it isn't relevant on BSD. [bmake builds on some pretty weird systems] If built with -DMAKE_NATIVE (it is in FreeBSD), then what ever the kernel provides is used if env vars are missing.