Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2011 09:50:29 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh <imp@FreeBSD.org>
Subject:   Re: svn commit: r218130 - head
Message-ID:  <4D541755.7010602@bsdimp.com>
In-Reply-To: <20110210134108.D80258@maildrop.int.zabbadoz.net>
References:  <201101311517.p0VFHl9F028038@svn.freebsd.org> <20110210134108.D80258@maildrop.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 02/10/2011 06:45, Bjoern A. Zeeb wrote:
> On Mon, 31 Jan 2011, Warner Losh wrote:
>
>> Author: imp
>> Date: Mon Jan 31 15:17:47 2011
>> New Revision: 218130
>> URL: http://svn.freebsd.org/changeset/base/218130
>>
>> Log:
>>  Move the architecture guessing from Makefile.inc1 to Makefile.  We
>>  need to do this because variables specified on the command line
>>  override those specified in the Makefile.  This is why we also moved
>>  from TARGET to _TARGET in Makefile, and then set TARGET on the command
>>  line when we fork a submake with Makefile.inc1.
>>
>>  This makes mips/mips work again, even without the workaround 
>> committed to
>>  lib/libc/Makefile.
>>
>> Modified:
>>  head/Makefile
>>  head/Makefile.inc1
>
> Hey,
>
> not sure if it's a result of this commit or one of the many others:
>
> env MAKEOBJDIRPREFIX=/path/to/obj make -f Makefile.inc1 hierarchy \
>     -DWITHOUT_TOOLCHAIN \
>         __MAKE_CONF=/path/to/make.conf SRCCONF=/path/to/src.conf \
>         DESTDIR=/path/to/destdir \
>         TARGET=i386
>
> results in:
>
> "/path/to/base9-201102092305/Makefile.inc1", line 127: Unknown target 
> :i386.
>
> This used to work before. TARGET_ARCH is unset, TARGET=i386 thus
> they differ and thus the check there tries to find "/i386" rather than
> just "i386".
>
> Is it a rather unsupported thing or what's the proper way to fix it?
> As a workaround I was also setting TARGET_ARCH=i386 for the moment.

Calling Makefile.inc1 directly isn't supported.  Instead, you should use 
the hierarchy target that's in Makefile directly.  If you want to call 
Makefile.inc1 for some reason, you'll need to pass it both TARGET and 
TARGET_ARCH.  I can turn it into an error to not pass both, but setting 
one based on the other not being set has a lot of holes in it.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D541755.7010602>