[Buildroot] [PATCH 8/9] RFC: Remove HOSTCFLAGS from kernel compile

Grant Likely grant.likely at secretlab.ca
Thu Oct 16 23:11:41 UTC 2008


On Thu, Oct 16, 2008 at 3:09 PM, Bernhard Reutner-Fischer
<rep.dot.nop at gmail.com> wrote:
> On Thu, Oct 16, 2008 at 02:32:56PM -0600, Grant Likely wrote:
>>From: Grant Likely <grant.likely at secretlab.ca>
>>
>>Setting HOSTCFLAGS when calling make for the kernel compile messes up
>>the tools that the kernel builds for itself.  Specifically, the
>>building of the device tree compiler (dtc) in arch/powerpc adds some
>>required flags to HOSTCFLAGS.  However, if HOSTCFLAGS= is specified
>>when calling make, then the local flags are never added and the kernel
>>compile fails.
>
> One could argue that this is really a bug in the kernel.

Indeed, but in which case; how *should* the kernel be adding to the
list of HOSTCFLAGS?.  I'll need to do more research methinks.

>>This patch removes the HOSTCFLAGS= from $(LINUX26_MAKE_FLAGS).  I've
>>marked this patch as an RFC because I don't know what is really required
>>here.  Removing it works for me (of course), but it may break other users.
>>I just don't know if there is a better way to set HOSTCFLAGS so that it
>>doesn't override the settings that the kernel uses itself.
>
> you could append it to HOSTCC, but that didn't work either (at least for
> some earlier 2.6.x). The problem with HOSTCFLAGS and HOSTCC is that for
> some hosts the HOSTCFLAGS are integral part of having a working HOSTCC,
> you can't separate them without rendering your HOSTCC completely
> dysfunctional (since the stuff is supposed to run, too).

Yeah, I figured as much (grumble).

Thanks for the comments.
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.



More information about the buildroot mailing list