From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Bj=C3=B8rn_Forsman?= Date: Thu, 11 Jul 2013 12:33:42 +0200 Subject: [Buildroot] [PATCH] Makefile: unset MAKEFLAGS In-Reply-To: References: <1373222539-8915-1-git-send-email-s.martin49@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 11 July 2013 11:37, Thomas De Schampheleire wrote: > Hi, > > On Sun, Jul 7, 2013 at 8:42 PM, Samuel Martin wrote: >> MAKEFLAGS can carry options that make Buildroot failed, eg. '-jN'. >> To avoid this, unset the MAKEFLAGS environment variable. >> >> Signed-off-by: Samuel Martin >> --- >> 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