Re: 11.0 -r301139: WITH_META_MODE=yes vs. "sh: ./make_keys: Exec format error"? [still true of -r301815]

From: Bryan Drewery <bdrewery_at_FreeBSD.org>
Date: Mon, 13 Jun 2016 09:21:26 -0700
On 6/12/2016 7:14 PM, Simon J. Gerraty wrote:
> Mark Millard <markmi_at_dsl-only.net> wrote:
>> Cross builds work just fine based on the FreeBSD tree when omitting WITH_META_MODE=.
>>
> 
> Hmm must do something odd then.
> 
>> As of -r301825 there is almost no use of HOST_CC at the upper levels or in share/mk/*:
> 
> Yes, which means if cross-building works it must be requring a separate
> walk of the tree or similar dance.

Yeah it's done in 2 walks with a shared objdir.  I am going to rework
these build-tools files to store their native binaries in BTOOLSDIR
(like DIRDEPS does for these for bootstrap-tools target actually).  Then
always use the one from the BTOOLSDIR, avoiding the chance of a target
one being built and ran from './'.

> It cannot work by building tools like make_keys in the same pass as the
> library, since that would require use of something other than CC.
> 
> 
>>> # grep HOST_CC /usr/src/Makefile*
>>> # grep HOST_CC /usr/src/share/mk/*
>>> /usr/src/share/mk/bsd.compiler.mk:.for var in CC CXX HOST_CC HOST_CXX
>>
>> where that last does:
> 
> Yes, that's for ccache, but I don't see HOST_CC used anywhere.
> 
> Sorry, guess I have no clue how cross-building currently works in
> FreeBSD, but as is it won't work with DIRDEPS - which pretty much
> expects to be able to build the tree in a single pass.
> 
> META_MODE should be orgthogonal, but that appears not to be so.
> 

It's mostly orthogonal. Since there is a shared objdir for both the
'build-tools' and 'lib' and 'everything' walks, the CFLAGS/CC does
change and cause rebuilds.  I have some hacks in there now that I'm not
happy with and am going to rework.


-- 
Regards,
Bryan Drewery


Received on Mon Jun 13 2016 - 14:21:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC