LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86 vdso: fix build locale dependency
@ 2008-02-27 19:42 Roland McGrath
  2008-02-27 20:43 ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Roland McGrath @ 2008-02-27 19:42 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner
  Cc: Andrew Morton, Linus Torvalds, linux-kernel, Priit Laes


Priit Laes discovered that the sed command processing nm output was
sensitive to locale settings.  This was addressed in commit
03994f01e8b72b3d01fd3d09d1cc7c9f421a727c by using [:alnum:] in place of
[a-zA-Z0-9].  But that too is locale-dependent and may not always match
the identifiers it needs to.  The better fix is just to run sed et al
with a fixed locale setting in all builds.

Signed-off-by: Roland McGrath <roland@redhat.com>
CC: Priit Laes <plaes@plaes.org>
---
 arch/x86/vdso/Makefile |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index b8bd0c4..0a8f474 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -48,9 +48,11 @@ obj-$(VDSO64-y)			+= vdso-syms.lds
 # Match symbols in the DSO that look like VDSO*; produce a file of constants.
 #
 sed-vdsosym := -e 's/^00*/0/' \
-	-e 's/^\([[:xdigit:]]*\) . \(VDSO[[:alnum:]_]*\)$$/\2 = 0x\1;/p'
+	-e 's/^\([0-9a-fA-F]*\) . \(VDSO[a-zA-Z0-9_]*\)$$/\2 = 0x\1;/p'
 quiet_cmd_vdsosym = VDSOSYM $@
-      cmd_vdsosym = $(NM) $< | sed -n $(sed-vdsosym) | LC_ALL=C sort > $@
+define cmd_vdsosym
+	$(NM) $< | LC_ALL=C sed -n $(sed-vdsosym) | LC_ALL=C sort > $@
+endef
 
 $(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE
 	$(call if_changed,vdsosym)

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

* Re: [PATCH] x86 vdso: fix build locale dependency
  2008-02-27 19:42 [PATCH] x86 vdso: fix build locale dependency Roland McGrath
@ 2008-02-27 20:43 ` Sam Ravnborg
  2008-02-27 20:45   ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2008-02-27 20:43 UTC (permalink / raw)
  To: Roland McGrath
  Cc: Ingo Molnar, Thomas Gleixner, Andrew Morton, Linus Torvalds,
	linux-kernel, Priit Laes

On Wed, Feb 27, 2008 at 11:42:15AM -0800, Roland McGrath wrote:
> 
> Priit Laes discovered that the sed command processing nm output was
> sensitive to locale settings.  This was addressed in commit
> 03994f01e8b72b3d01fd3d09d1cc7c9f421a727c by using [:alnum:] in place of
> [a-zA-Z0-9].  But that too is locale-dependent and may not always match
> the identifiers it needs to.  The better fix is just to run sed et al
> with a fixed locale setting in all builds.

Priit's original patch used the LC_ALL trick. It is
me to blame that it was replaced with [:alnum:] :-(

	Sam

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

* Re: [PATCH] x86 vdso: fix build locale dependency
  2008-02-27 20:43 ` Sam Ravnborg
@ 2008-02-27 20:45   ` Ingo Molnar
  2008-02-27 20:52     ` Roland McGrath
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2008-02-27 20:45 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Roland McGrath, Thomas Gleixner, Andrew Morton, Linus Torvalds,
	linux-kernel, Priit Laes


* Sam Ravnborg <sam@ravnborg.org> wrote:

> On Wed, Feb 27, 2008 at 11:42:15AM -0800, Roland McGrath wrote:
> > 
> > Priit Laes discovered that the sed command processing nm output was
> > sensitive to locale settings.  This was addressed in commit
> > 03994f01e8b72b3d01fd3d09d1cc7c9f421a727c by using [:alnum:] in place of
> > [a-zA-Z0-9].  But that too is locale-dependent and may not always match
> > the identifiers it needs to.  The better fix is just to run sed et al
> > with a fixed locale setting in all builds.
> 
> Priit's original patch used the LC_ALL trick. It is me to blame that 
> it was replaced with [:alnum:] :-(

ok. I've queued up Roland's re-fix. We'll eventually converge to 
something everyone is happy with ;-)

	Ingo

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

* Re: [PATCH] x86 vdso: fix build locale dependency
  2008-02-27 20:45   ` Ingo Molnar
@ 2008-02-27 20:52     ` Roland McGrath
  0 siblings, 0 replies; 4+ messages in thread
From: Roland McGrath @ 2008-02-27 20:52 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Sam Ravnborg, Thomas Gleixner, Andrew Morton, Linus Torvalds,
	linux-kernel, Priit Laes

> ok. I've queued up Roland's re-fix. We'll eventually converge to 
> something everyone is happy with ;-)

Hey, I'm happy with living in the C locale.  It's catering to you
troublesome people covering the vast majority of the planet that has
me worrying about pedantic correctness for whatever the least-similar
LC_CTYPE anyone uses might entail.  :-)


Thanks,
Roland

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

end of thread, other threads:[~2008-02-27 20:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-27 19:42 [PATCH] x86 vdso: fix build locale dependency Roland McGrath
2008-02-27 20:43 ` Sam Ravnborg
2008-02-27 20:45   ` Ingo Molnar
2008-02-27 20:52     ` Roland McGrath

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).