qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Makefile: Set default locale C


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] Makefile: Set default locale C
Date: Sat, 24 Mar 2012 18:56:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19

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 <address@hidden> wrote:
On 23 March 2012 20:05, Stefan Weil <address@hidden> 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

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