[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B47D6E3.8080300@redhat.com>
Date: Fri, 08 Jan 2010 20:07:47 -0500
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Michal Marek <mmarek@...e.cz>
CC: "H. Peter Anvin" <hpa@...or.com>,
Simon Horman <horms@...ge.net.au>,
Roland Dreier <rdreier@...co.com>,
Sam Ravnborg <sam@...nborg.org>,
Sergei Trofimovich <slyfox@...ox.ru>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-sh@...r.kernel.org
Subject: Re: [PATCH] Makefile: do not override LC_CTYPE
Michal Marek wrote:
> Setting LC_CTYPE=C breaks localized messages in some setups. With only
> LC_COLLATE=C and LC_NUMERIC=C, we get almost all we need, except for not
> so defined character classes and tolower()/toupper(). The former is not
> a big issue, because we can assume that e.g. [:alpha:] will always
> include a-zA-Z and we only ever process ASCII input. The latter seems
> only affect arch/sh/tools/gen-mach-types, which we can handle separately.
>
> So after this patch the meaning of ranges like [a-z], the behavior of
> sort and join, etc. should be the same everywhere and at the same time
> gcc should be able to print localized waring and error messages.
> LC_NUMERIC=C might not be necessary, but setting it doesn't hurt.
>
> Reported-by: Simon Horman <horms@...ge.net.au>
> Reported-by: Sergei Trofimovich <slyfox@...ox.ru>
> Signed-off-by: Michal Marek <mmarek@...e.cz>
I checked that this change doesn't affect arch/x86/tools/gen-insn-attr-x86.awk.
Tested-by: Masami Hiramatsu <mhiramat@...hat.com>
Thank you!
> ---
>
> Note: if this still breaks for someone, we will simply set LC_ALL=C.
>
> Makefile | 3 +--
> arch/sh/tools/Makefile | 2 +-
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 09a320f..a7b4351 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -18,10 +18,9 @@ MAKEFLAGS += -rR --no-print-directory
>
> # Avoid funny character set dependencies
> unexport LC_ALL
> -LC_CTYPE=C
> LC_COLLATE=C
> LC_NUMERIC=C
> -export LC_CTYPE LC_COLLATE LC_NUMERIC
> +export LC_COLLATE LC_NUMERIC
>
> # We are using a recursive build, so we need to do a little thinking
> # to get the ordering right.
> diff --git a/arch/sh/tools/Makefile b/arch/sh/tools/Makefile
> index 558a56b..2082af1 100644
> --- a/arch/sh/tools/Makefile
> +++ b/arch/sh/tools/Makefile
> @@ -13,4 +13,4 @@
> include/generated/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
> @echo ' Generating $@'
> $(Q)mkdir -p $(dir $@)
> - $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
> + $(Q)LC_ALL=C $(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists