Skip to contentSkip to conversation

x86: fix build on non-C locales.

PATCH Applied Priit Laes 3 participants 5 messages Feb 23, 2008 – Feb 24, 2008 x86

lore
Share & tools
lore

Priit Laes

author
#0 lore raw

PATCH 1/1 x86: fix build on non-C locales.

x86: fix build on some non-C locales[1].

For some locales regex range [a-zA-Z] does not work as it is supposed to so we have to specify LANG=C to make it work as intended.

[1] http://en.wikipedia.org/wiki/Estonian_alphabet

arch/x86/vdso/Makefile +2 -1
index f385a4b..c58e7b9 100644
@@ -50,7 +50,8 @@ obj-$(VDSO64-y)			+= vdso-syms.lds
 sed-vdsosym := -e 's/^00*/0/' \
 	-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 > $@
+      cmd_vdsosym = $(NM) $< | LC_ALL=C sed -n $(sed-vdsosym) \
+	  		| LC_ALL=C sort > $@
 
 $(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE
 	$(call if_changed,vdsosym)
Applied
#1 lore raw
Quoted 4 lines · Priit Laes

x86: fix build on some non-C locales[1].

For some locales regex range [a-zA-Z] does not work as it is supposed to so we have to specify LANG=C to make it work as intended.

thanks, applied.

Ingo

author
#3 lore raw

Ühel kenal päeval, P, 2008-02-24 kell 10:03, kirjutas Sam Ravnborg:

Quoted 3 lines

Hi Prit.

Could we just use [[:alnum:]] and drop the setting of LC_ALL?

Yes, it works. Reverted the previous patch and did this:

arch/x86/vdso/Makefile +0 -0
index f385a4b..b8bd0c4 100644
@@ -48,7 +48,7 @@ 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/^\([0-9a-fA-F]*\) . \(VDSO[a-zA-Z0-9_]*\)$$/\2 = 0x\1;/p'
+ -e 's/^\([[:xdigit:]]*\) . \(VDSO[[:alnum:]_]*\)$$/\2 = 0x\1;/p'
quiet_cmd_vdsosym = VDSOSYM $@

       cmd_vdsosym = $(NM) $< | sed -n $(sed-vdsosym) | LC_ALL=C sort >

$@

#4 lore raw

Review

Quoted 3 lines · Priit Laes

sed-vdsosym := -e 's/^00*/0/' \

(quoted diff) +1 -1
-       -e 's/^\([0-9a-fA-F]*\) . \(VDSO[a-zA-Z0-9_]*\)$$/\2 = 0x\1;/p'
+       -e 's/^\([[:xdigit:]]*\) . \(VDSO[[:alnum:]_]*\)$$/\2 = 0x\1;/p'

thanks, i picked up this one instead of the first version.

Ingo