mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Clearing env vars (was Qt compilation options


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] Clearing env vars (was Qt compilation options)
Date: Mon, 12 Aug 2013 16:25:19 +1000

On 11/08/2013, at 1:44 PM, Tony Theodore <address@hidden> wrote:

> 
> On 10/08/2013, at 11:40 PM, Tony Theodore <address@hidden> wrote:
> 
>> 
>> On 07/08/2013, at 9:37 PM, Tony Theodore <address@hidden> wrote:
>>> Just today[2], there was an issue that seems to be environment related - 
>>> I'd like to just dump the output of env/set, but am reluctant to do so as 
>>> some people think it's a good idea to store various credentials in env vars.
>> 
>> I wonder if we could ignore the environment altogether with:
>> 
>> env -i PATH=$PATH make
> 
> Also needs LANG=$LANG set to avoid bizarre "INTERNAL: Exiting with 1 
> jobserver tokens available; should be 8!" errors. I couldn't find any 
> references for this, just slowly worked through the LFS minimal settings[1] - 
> I should have looked there first to save myself a lot of time. LFS also sets 
> HOME, TERM, and PS1[2] - but these aren't necessary. Tested on OSX with make 
> 3.81 and 3.82.

Tested also on Debian and FreeBSD. Using "env -i" in the "build-only-foo" 
recursive doesn't fail, but probably has some subtle hidden bugs as Make uses 
the environment to communicate with child processes. For example, the "make 
foo_BUILD=" trick doesn't get pushed down to the second level call and tries to 
actually build foo.

I've gone the other way - to "unexport" everything not on the whitelist:

https://github.com/mxe/mxe/commit/87cf91e5e1f6d3caf876ab16cc61b353f722ec41

This lets Make communicate with itself correctly, is independent of Make 
version, and is easily duplicated in an interactive session:

http://mxe.cc/#tutorial-4

Cheers,

Tony




reply via email to

[Prev in Thread] Current Thread [Next in Thread]