From owner-freebsd-arm@freebsd.org Sat Oct 14 04:28:14 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 ABC49E3C182 for ; Sat, 14 Oct 2017 04:28:14 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47F6730AA for ; Sat, 14 Oct 2017 04:28:14 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id q124so24587333wmb.0 for ; Fri, 13 Oct 2017 21:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JYeVL+3n5tU8Ys1KymmOUgngulwz4w1/i/qavglOvys=; b=V9RaqLQmukC1EC77Xwvd2j376VsaBtVMHtAgw7jWfDRiaWWakJ+mjFTe5ULSMDmKa5 uAT/3yNfxliBjok8Kq70vqi6/M3tBYPnFsXpfKbYfBCRqAILOZofqDw+XHF9jBruDp2f 82gNSRkXAYnB2dhfHHB4h+U8IFEFDHi6NzN6T29ghWuEHcqSvSJkhoV7dOQxU4LtqoHr pmALfyyOhzj1PLKkHUg0i37m5rmJADPTGXocxMK997gvUOi+3S9bC4JUAUFHm+gkHB3b xbGue7mjhMQyXSUZCVYrtgTnRbkUqV8Jgzu8lSN8tZ4gxiZ5G6pDQDcrqdnAeHcD7ihO K7TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:cc:references :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=JYeVL+3n5tU8Ys1KymmOUgngulwz4w1/i/qavglOvys=; b=Q5E2hWHIagYv9SPk8fhx+fE0NnsffYds/71egTphnxaIZKDC/Obl13LxwBX6Dn8KDF VZAD5TBYRL1B9b6Tw7ICiZ4X91wud4Y6HC13P1WFQ9AD1ELH2YluGwqA6BI+LP92fmHY 5BtpBnGi6Z4Ms1Doq5kBmKImThgCAkoc5TDcNr2sY0vhfOuyTc+VGx8pmvEpnnm66HO1 jHOex4xhZvjq2uLJCA0bd0ETT5mboF6ZJT+VSo89xo314Gyw+mHdJQ8jGjy+WqW0r0Ff Hq9b4KQ6hq7ZihkyaLX5mzw50u/Id1zqllnKBt1UqNz2Av9u/wyEYJmgY/+iqjH3YWvP 9pNQ== X-Gm-Message-State: AMCzsaWe//QbZ9QSnC0BWatPC8X/HwXZFSFxEzKUSOYO+dsA2Y77Qa1l nDpKlBoT/FQRYQ9MWZvWaddhs+jG5Iw= X-Google-Smtp-Source: ABhQp+SjUpHTxkpKgKF3dmKVWygRXZaIPAtkKY5qNygVC2XvR+Cb/6fYLTbV6shY06BhmYNRa3rSag== X-Received: by 10.28.212.210 with SMTP id l201mr2618598wmg.98.1507955292857; Fri, 13 Oct 2017 21:28:12 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id b15sm1767468wrh.35.2017.10.13.21.28.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 21:28:12 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: Difficulty with armv6 to v7 transition. To: bob prohaska , Mark Millard Cc: freebsd-arm@freebsd.org, bob prohaska References: <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> <20171014010713.GA75288@www.zefox.net> <254A2C41-59A9-4E4E-8982-ADDBAE2B5F91@dsl-only.net> <20171014021133.GB75288@www.zefox.net> Message-ID: <39f6419f-48f3-aaec-dfa4-3048c8a893d8@freebsd.org> Date: Sat, 14 Oct 2017 06:28:13 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171014021133.GB75288@www.zefox.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Sat, 14 Oct 2017 04:28:14 -0000 On 14.10.2017 4:11, bob prohaska wrote: > On Fri, Oct 13, 2017 at 06:27:22PM -0700, Mark Millard wrote: >> On 2017-Oct-13, at 6:07 PM, bob prohaska wrote: >> >>> Seems it would have been better to replace >>> BUILD_ARCH!= uname -p >>> with >>> BUILD_ARCH!= echo armv7 >>> for present purposes. >> >> Are you starting under armv6 ? armv7 ? > I'm afraid it's a mix, due to some untimely foot-shooting. > > Uname - p reports armv7, but clang -v reports > FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) > Target: armv6-unknown-freebsd12.0-gnueabihf > Thread model: posix > InstalledDir: /usr/bin > > I'll keep trying to unscramble the mess I've made until an armv7 RPI2 > snapshot is released, then start over if necessary. > > Thanks for reading! > > bob prohaska > Bob, can you please try this? setenv MACHINE_ARCH armv7; make buildworld TARGET=arm TARGET_ARCH=armv7 Michal > >> BUILD_ARCH should end up matching what >> you start under, not the end target as >> I understand things. >> >> If I tried a cross build on a host >> other than armv7 that BUILD_ARCH result >> would be wrong. (I use amd64 for cross >> building aarch64 and arm6 . I'm not up to >> an armv7 capable context yet and may not >> be for some time.) >> >> That change is a local workaround that is >> specific to the environment you are using >> for a build. >> >> This is like my 12.0-CURRENT change being >> specific to my not building on 11.x or 10.x . >> It is just a local workaround that applies >> just to a more limited context. >> >> I've not figured out what is going on (how/why) >> for the != uname behavior that I observed. But >> echoing the expected result instead did work. >> >> None of this is appropriate to check-in. >> >>> I'll stop the buildworld in progress and try it. >> >> Please report if echo of the host type of context >> appears to make your local environment work vs. >> not. If it does work then it suggests that >> != uname -p did not get the expected text for >> some reason. >> >> Older material: >> >> On Fri, Oct 13, 2017 at 11:36:46AM -0700, Mark Millard wrote: >>> 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 >> > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >