Am 24.03.2012 17:11, schrieb Emre Ersin:
It has to be set before configure. Because configure script creates wrong .h file.

On Sat, Mar 24, 2012 at 2:44 PM, Peter Maydell <peter.mayd...@linaro.org <mailto:peter.mayd...@linaro.org>> wrote:

    On 23 March 2012 20:05, Stefan Weil <s...@weilnetz.de
    <mailto:s...@weilnetz.de>> wrote:
    > +# Set default locale for commands like tr and others.
    > +LANG=C
    > +LC_ALL=C
    > +LC_CTYPE=C

    You don't export these, which leads to an obscure corner case:
    if the user has no LANG variable set in their environment when
    they run make then we will set LANG=C in the top level makefile
    but it will not be set in a sub-makefile. Since the default
    locale is the same as the C locale this doesn't make any
    practical difference, but it's a little odd.

    (Make automatically exports variables to submakes if they had
    some value in its environment when it was started, but not if
    they were only set in the makefile.)

    Also, do we need to set these in configure too?


Hi Peter,

yes, the same kind of patch is needed for configure, too.
I've already prepared one, but wanted to wait until this patch
was reviewed.

I intentionally did not add 'export' in the Makefile because up to now,
QEMU did not use this keyword in Makefiles, and I was not sure
whether it works on all build hosts with all variants of make.

I tested that my patch works. It's like you said: either the environment
variables are exported - then the settings in the Makefile override
the values and set the correct ones. Or they are not exported -
then the default setting is used which is also correct.

With my patch, configure creates a correct .h file.
There is no dependency on Makefile, so you have to remove the old
wrong .h file before running a new incremental build.

Regards,
Stefan W.

Reply via email to