From: Masami Hiramatsu <mhiramat@redhat.com> To: Michal Marek <mmarek@suse.cz> Cc: "H. Peter Anvin" <hpa@zytor.com>, Simon Horman <horms@verge.net.au>, Roland Dreier <rdreier@cisco.com>, Sam Ravnborg <sam@ravnborg.org>, Sergei Trofimovich <slyfox@inbox.ru>, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org Subject: Re: [PATCH] Makefile: do not override LC_CTYPE Date: Sat, 09 Jan 2010 01:07:47 +0000 [thread overview] Message-ID: <4B47D6E3.8080300@redhat.com> (raw) In-Reply-To: <1262952988-16563-1-git-send-email-mmarek@suse.cz> 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@verge.net.au> > Reported-by: Sergei Trofimovich <slyfox@inbox.ru> > Signed-off-by: Michal Marek <mmarek@suse.cz> I checked that this change doesn't affect arch/x86/tools/gen-insn-attr-x86.awk. Tested-by: Masami Hiramatsu <mhiramat@redhat.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@redhat.com
WARNING: multiple messages have this Message-ID (diff)
From: Masami Hiramatsu <mhiramat@redhat.com> To: Michal Marek <mmarek@suse.cz> Cc: "H. Peter Anvin" <hpa@zytor.com>, Simon Horman <horms@verge.net.au>, Roland Dreier <rdreier@cisco.com>, Sam Ravnborg <sam@ravnborg.org>, Sergei Trofimovich <slyfox@inbox.ru>, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org Subject: Re: [PATCH] Makefile: do not override LC_CTYPE Date: Fri, 08 Jan 2010 20:07:47 -0500 [thread overview] Message-ID: <4B47D6E3.8080300@redhat.com> (raw) In-Reply-To: <1262952988-16563-1-git-send-email-mmarek@suse.cz> 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@verge.net.au> > Reported-by: Sergei Trofimovich <slyfox@inbox.ru> > Signed-off-by: Michal Marek <mmarek@suse.cz> I checked that this change doesn't affect arch/x86/tools/gen-insn-attr-x86.awk. Tested-by: Masami Hiramatsu <mhiramat@redhat.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@redhat.com
next prev parent reply other threads:[~2010-01-09 1:07 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-12-24 11:13 [patch] Makefile: Unexport LANG Simon Horman 2009-12-26 4:30 ` Masami Hiramatsu 2009-12-26 5:14 ` H. Peter Anvin 2009-12-26 11:20 ` Simon Horman 2010-01-08 0:41 ` Simon Horman 2010-01-08 0:43 ` H. Peter Anvin 2010-01-08 2:45 ` Simon Horman 2010-01-08 2:59 ` Simon Horman 2010-01-08 11:57 ` Michal Marek 2010-01-08 12:16 ` [PATCH] Makefile: do not override LC_CTYPE Michal Marek 2010-01-08 12:16 ` Michal Marek 2010-01-08 18:50 ` H. Peter Anvin 2010-01-08 18:50 ` H. Peter Anvin 2010-01-09 0:00 ` Simon Horman 2010-01-09 0:00 ` Simon Horman 2010-01-09 0:07 ` H. Peter Anvin 2010-01-09 0:07 ` H. Peter Anvin 2010-01-09 0:09 ` Masami Hiramatsu 2010-01-09 0:09 ` Masami Hiramatsu 2010-01-09 0:16 ` H. Peter Anvin 2010-01-09 0:16 ` H. Peter Anvin 2010-01-09 0:30 ` Masami Hiramatsu 2010-01-09 0:30 ` Masami Hiramatsu 2010-01-09 0:43 ` H. Peter Anvin 2010-01-09 0:43 ` H. Peter Anvin 2010-01-09 0:53 ` Masami Hiramatsu 2010-01-09 0:53 ` Masami Hiramatsu 2010-01-11 9:52 ` Michal Marek 2010-01-11 9:52 ` Michal Marek 2010-01-11 10:52 ` Alan Cox 2010-01-12 0:50 ` H. Peter Anvin 2010-01-12 0:50 ` H. Peter Anvin 2010-01-09 1:07 ` Masami Hiramatsu [this message] 2010-01-09 1:07 ` Masami Hiramatsu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4B47D6E3.8080300@redhat.com \ --to=mhiramat@redhat.com \ --cc=horms@verge.net.au \ --cc=hpa@zytor.com \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=mmarek@suse.cz \ --cc=rdreier@cisco.com \ --cc=sam@ravnborg.org \ --cc=slyfox@inbox.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.