Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2017 11:36:46 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Difficulty with armv6 to v7 transition.
Message-ID:  <F9F4D731-35CD-44E6-8419-D73CB98655E9@dsl-only.net>
In-Reply-To: <20171013175943.GA74121@www.zefox.net>
References:  <20171009175216.GA52497@www.zefox.net> <1507573171.84167.9.camel@freebsd.org> <20171011023356.GA57571@www.zefox.net> <CANCZdfrKYabu1-bWxX47=Lt=33e%2BFjBXCNBNiGPE7K-83KOAHA@mail.gmail.com> <CANCZdfqHfAe24q=6n8CxsHQv24j58bQLPG3z_7vi_xpGjdQzDg@mail.gmail.com> <20171011030021.GB57571@www.zefox.net> <20171013020604.GA70845@www.zefox.net> <20171013175943.GA74121@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2017-Oct-13, at 10:59 AM, bob prohaska <fbsd at www.zefox.net> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F9F4D731-35CD-44E6-8419-D73CB98655E9>