From owner-freebsd-arch@FreeBSD.ORG Wed May 8 05:47:20 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 06583A35; Wed, 8 May 2013 05:47:20 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og109.obsmtp.com (exprod7og109.obsmtp.com [64.18.2.171]) by mx1.freebsd.org (Postfix) with ESMTP id 83E73796; Wed, 8 May 2013 05:47:17 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob109.postini.com ([64.18.6.12]) with SMTP ID DSNKUYnm33E1UeIBfmGKPpNSfFv2pUVLpde8@postini.com; Tue, 07 May 2013 22:47:19 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB02-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 7 May 2013 22:41:22 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r485fML77620; Tue, 7 May 2013 22:41:22 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id DCA7258097; Tue, 7 May 2013 22:41:21 -0700 (PDT) To: Warner Losh Subject: Re: [RFC] adding a variable to .mk and Makefile.inc1 to point to top of the FreeBSD source tree In-Reply-To: References: <20130507213118.5277F58097@chaos.jnpr.net> Comments: In-reply-to: Warner Losh message dated "Tue, 07 May 2013 21:25:37 -0600." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 7 May 2013 22:41:21 -0700 Message-ID: <20130508054121.DCA7258097@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: Garrett Cooper , freebsd-toolchain@freebsd.org, "freebsd-arch@FreeBSD.org Arch" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2013 05:47:20 -0000 On Tue, 7 May 2013 21:25:37 -0600, Warner Losh writes: >where does MAKEOBJDIRPREFIX come into play? I don't normally use it, it is a handy but rather crude implement. I normally use MAKEOBJDIR='${.CURDIR:S,${SRCTOP},${OBJTOP},}' which gives you a similar - but much neater result than MAKEOBJDIRPREFIX. >We do it both ways: on some architectures we have multiple = >MACHINE_ARCHes per MACHINE (like mips and arm) and on others we have one = >MACHINE_ARCH and mutliple machines (like i386 and pc98). Yes, which is why I'm adjusting accordingly. >We currently use ${MACHINE}.${MACHINE_ARCH} for cross builds, which = >works out nicely. For historical reasons that turn out to be = >inconvenient, we don't do this for native builds. >Why is this gratuitously different than the current scheme? Do you mean why not simply use ${MACHINE}.${MACHINE_ARCH} always? Encoding both MACHINE and MACHINE_ARCH always is doable, but I avoid '.' because it prevents being able to use modifiers like :R and :E to separate the directory component from the target machine spec. The projects/bmake branch is about showing how freebsd can be built in meta mode. The tree dependencies are represented as dir.target_spec >would I build a pc98 build with this? And why have it be different for = it would just get pc98 since there's no ambiguity. But as noted above, if you wanted to always be explicit that wouldn't be a problem (assuming '.' is avoided).