[Buildroot] [PATCH] Makefile: unset MAKEFLAGS

Bjørn Forsman bjorn.forsman at gmail.com
Thu Jul 11 10:33:42 UTC 2013


On 11 July 2013 11:37, Thomas De Schampheleire
<patrickdepinguin+buildroot at gmail.com> wrote:
> Hi,
>
> On Sun, Jul 7, 2013 at 8:42 PM, Samuel Martin <s.martin49 at gmail.com> wrote:
>> MAKEFLAGS can carry options that make Buildroot failed, eg. '-jN'.
>> To avoid this, unset the MAKEFLAGS environment variable.
>>
>> Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
>> ---
>>  Makefile | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Makefile b/Makefile
>> index 015fbdf..11a7b70 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -207,6 +207,7 @@ unexport CFLAGS
>>  unexport CXXFLAGS
>>  unexport GREP_OPTIONS
>>  unexport CONFIG_SITE
>> +unexport MAKEFLAGS
>>  unexport QMAKESPEC
>>  unexport TERMINFO
>>
>
> What is the strategy with respect to cleaning up the user's
> environment when building buildroot?
> Because there are a number of other variables that users can have (and
> do have) that corrupt the build, for example:
>
> C_INCLUDE_PATH
> CPLUS_INCLUDE_PATH
> LIBRARY_PATH
> LD_LIBRARY_PATH
> PERL5LIB
> GCC_EXEC_PREFIX
>
> In the twisted environments that I'm working in, I'm unsetting these
> from a wrapper around buildroot make. However, it seems that there
> already are a number of cleanups done inside buildroot itself, so it
> makes sense to add the above variables to the list.
>
> What do you think?

How about going all the way: clean out the environment completely, and
explicitly add env vars to builders as needed. That would result in a
more deterministic build environment, IMHO.

Best regards,
Bjørn Forsman



More information about the buildroot mailing list