From owner-freebsd-arm@freebsd.org Fri Oct 13 18:43:30 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41A21E29F06 for ; Fri, 13 Oct 2017 18:43:30 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-20.reflexion.net [208.70.210.20]) (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 E631670BE1 for ; Fri, 13 Oct 2017 18:43:28 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 6456 invoked from network); 13 Oct 2017 18:36:47 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 13 Oct 2017 18:36:47 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Fri, 13 Oct 2017 14:36:47 -0400 (EDT) Received: (qmail 31723 invoked from network); 13 Oct 2017 18:36:47 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 13 Oct 2017 18:36:47 -0000 Received: from [192.168.1.26] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 057E5EC807E; Fri, 13 Oct 2017 11:36:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Difficulty with armv6 to v7 transition. From: Mark Millard In-Reply-To: <20171013175943.GA74121@www.zefox.net> Date: Fri, 13 Oct 2017 11:36:46 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <20171009175216.GA52497@www.zefox.net> <1507573171.84167.9.camel@freebsd.org> <20171011023356.GA57571@www.zefox.net> <20171011030021.GB57571@www.zefox.net> <20171013020604.GA70845@www.zefox.net> <20171013175943.GA74121@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 18:43:30 -0000 On 2017-Oct-13, at 10:59 AM, bob prohaska wrote: > It turns out that simply commenting out lines 447-452 in > /usr/src/Makefile.inc1 allows buildworld to run, even with > no /etc/make.conf in place. For reference: 447 .if make(buildworld) 448 BUILD_ARCH!= uname -p 449 .if ${MACHINE_ARCH} != ${BUILD_ARCH} 450 .error To cross-build, set TARGET_ARCH. 451 .endif 452 .endif (I suggest that the .error message include the MACHINE_ARCH text and the BUILD_ARCH text, probably with ""s around each so that empty is easy to see.) I've had problems with Makefiles using != and uname ending up with the MACRO assigned being an empty string despite a command-line uname returning the expected text. For example I've applied the below local work arounds to my /usr/ports/Mk/bsd.port.mk copy as part of setting up to do amd64 -> aarch64 or amd64 -> armv6 cross builds of ports via poudriere (I've not updated to a armv7-targeting vintage sources yet): # Get the operating system type .if !defined(OPSYS) -OPSYS!= ${UNAME} -s +OPSYS!= echo FreeBSD .endif _EXPORTED_VARS+= OPSYS .if !defined(_OSRELEASE) -_OSRELEASE!= ${UNAME} -r +_OSRELEASE!= echo 12.0-CURRENT .endif _EXPORTED_VARS+= _OSRELEASE I was specifically ending up with _OSRELEASE being empty as seen in poudriere prior to the workaround and that was messing up poudriere such that it stopped with an associated message. === Mark Millard markmi at dsl-only.net