linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Unexport LANG env variable
@ 2017-06-14 12:40 Alexey Brodkin
  2017-06-14 13:02 ` Michal Marek
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2017-06-14 12:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-kbuild, Michal Marek, Masahiro Yamada, linux-snps-arc,
	Alexey Brodkin, Vineet Gupta

In those cases when we parse output of standard utilities like readelf
etc we rely on a particular sentences. For example for ARC we extract
an entry-point from vmlinux like that:
---------------------->8--------------------
readelf -h vmlinux | grep "Entry point address" | grep -o 0x.*
---------------------->8--------------------

And in case LANG is set to anything other than en_XX we're getting
nothing and subsequent execution of mkimage utility fails.

Probably there're more cases like that but given people rarely
use non-English locales on their dev machines problems like the one
above are not very visible.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index cdaa747f2a6a..581e684783ef 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ MAKEFLAGS += -rR --include-dir=$(CURDIR)
 
 # Avoid funny character set dependencies
 unexport LC_ALL
+unexport LANG
 LC_COLLATE=C
 LC_NUMERIC=C
 export LC_COLLATE LC_NUMERIC
-- 
2.7.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Unexport LANG env variable
  2017-06-14 12:40 [PATCH] Unexport LANG env variable Alexey Brodkin
@ 2017-06-14 13:02 ` Michal Marek
  2017-06-14 13:11   ` Alexey Brodkin
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Marek @ 2017-06-14 13:02 UTC (permalink / raw)
  To: Alexey Brodkin
  Cc: linux-kernel, linux-kbuild, Masahiro Yamada, linux-snps-arc,
	Vineet Gupta

Dne 14.6.2017 v 14:40 Alexey Brodkin napsal(a):
> In those cases when we parse output of standard utilities like readelf
> etc we rely on a particular sentences. For example for ARC we extract
> an entry-point from vmlinux like that:
> ---------------------->8--------------------
> readelf -h vmlinux | grep "Entry point address" | grep -o 0x.*
> ---------------------->8--------------------
> 
> And in case LANG is set to anything other than en_XX we're getting
> nothing and subsequent execution of mkimage utility fails.
> 
> Probably there're more cases like that but given people rarely
> use non-English locales on their dev machines problems like the one
> above are not very visible.

I'm all for this change but the *.po files in the gcc tree must have
been created for a reason:

  https://github.com/gcc-mirror/gcc/tree/master/gcc/po

:)

Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Unexport LANG env variable
  2017-06-14 13:02 ` Michal Marek
@ 2017-06-14 13:11   ` Alexey Brodkin
  2017-06-16  0:29     ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2017-06-14 13:11 UTC (permalink / raw)
  To: mmarek
  Cc: linux-kernel, linux-kbuild, yamada.masahiro, linux-snps-arc,
	Vineet.Gupta1

Hi Michal,

On Wed, 2017-06-14 at 15:02 +0200, Michal Marek wrote:
> Dne 14.6.2017 v 14:40 Alexey Brodkin napsal(a):
> > 
> > In those cases when we parse output of standard utilities like readelf
> > etc we rely on a particular sentences. For example for ARC we extract
> > an entry-point from vmlinux like that:
> > ---------------------->8--------------------
> > readelf -h vmlinux | grep "Entry point address" | grep -o 0x.*
> > ---------------------->8--------------------
> > 
> > And in case LANG is set to anything other than en_XX we're getting
> > nothing and subsequent execution of mkimage utility fails.
> > 
> > Probably there're more cases like that but given people rarely
> > use non-English locales on their dev machines problems like the one
> > above are not very visible.
> 
> I'm all for this change but the *.po files in the gcc tree must have
> been created for a reason:
> 
>   https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_gcc-2Dmirror_gcc_tree_master_gcc_po&d=DwICBA&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes
> 0GFDDl656eViXO7breS55ytWkhpk5R81I&m=v2ilYYv6Z0WzVaIys3sCQdK3QBI9gqH7hUmoTGPpJ44&s=S3B79SHovtt1-wLRtngTUM0dKWMiokGE75HIrfgkbbc&e= 

That's for sure.

But then how may we have a predictable environment for our machinery?

I do realize that with that change in place people will start seeing
non-translated messages from other tools like compiler etc.

But probably that's not the worst idea as well because it helps googling :)

-Alexey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Unexport LANG env variable
  2017-06-14 13:11   ` Alexey Brodkin
@ 2017-06-16  0:29     ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2017-06-16  0:29 UTC (permalink / raw)
  To: Alexey Brodkin
  Cc: mmarek, linux-kernel, linux-kbuild, linux-snps-arc, Vineet.Gupta1

Hi Alexey,


2017-06-14 22:11 GMT+09:00 Alexey Brodkin <Alexey.Brodkin@synopsys.com>:
> Hi Michal,
>
> On Wed, 2017-06-14 at 15:02 +0200, Michal Marek wrote:
>> Dne 14.6.2017 v 14:40 Alexey Brodkin napsal(a):
>> >
>> > In those cases when we parse output of standard utilities like readelf
>> > etc we rely on a particular sentences. For example for ARC we extract
>> > an entry-point from vmlinux like that:
>> > ---------------------->8--------------------
>> > readelf -h vmlinux | grep "Entry point address" | grep -o 0x.*
>> > ---------------------->8--------------------
>> >
>> > And in case LANG is set to anything other than en_XX we're getting
>> > nothing and subsequent execution of mkimage utility fails.
>> >
>> > Probably there're more cases like that but given people rarely
>> > use non-English locales on their dev machines problems like the one
>> > above are not very visible.
>>
>> I'm all for this change but the *.po files in the gcc tree must have
>> been created for a reason:
>>
>>   https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_gcc-2Dmirror_gcc_tree_master_gcc_po&d=DwICBA&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes
>> 0GFDDl656eViXO7breS55ytWkhpk5R81I&m=v2ilYYv6Z0WzVaIys3sCQdK3QBI9gqH7hUmoTGPpJ44&s=S3B79SHovtt1-wLRtngTUM0dKWMiokGE75HIrfgkbbc&e=
>
> That's for sure.
>
> But then how may we have a predictable environment for our machinery?
>
> I do realize that with that change in place people will start seeing
> non-translated messages from other tools like compiler etc.
>
> But probably that's not the worst idea as well because it helps googling :)


I do not want to lose users' freedom to choose their favorite language.


For example, arch/powerpc/boot/wrapper  does this

LANG=C elfformat="`${CROSS}objdump -p "$kernel" | grep 'file format' |
awk '{print $4}'`"


I think you can solve your problem like that.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-16  0:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14 12:40 [PATCH] Unexport LANG env variable Alexey Brodkin
2017-06-14 13:02 ` Michal Marek
2017-06-14 13:11   ` Alexey Brodkin
2017-06-16  0:29     ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).