[build] Make make_sunver.pl robust against non-C locales

Submitted by Rainer Orth on Feb. 26, 2013, 3:25 p.m.

Details

Message ID yddip5f9jw8.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Feb. 26, 2013, 3:25 p.m.
I've received a report in private mail that a gcc build on Solaris might
fail in libstdc++.  It turned out that this was caused by a non-C locale
which causes elfdump to produce translated headers and confuses
make_sunver.pl.  The following patch fixes this; tested manually by
setting LANG=de in the environment before building
libstdc++-symbols.ver-sun.

Ok for mainline?

	Rainer


2013-02-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* make_sunver.pl: Enforce C locale.

Comments

Paolo Bonzini Feb. 26, 2013, 3:28 p.m.
Il 26/02/2013 16:25, Rainer Orth ha scritto:
> I've received a report in private mail that a gcc build on Solaris might
> fail in libstdc++.  It turned out that this was caused by a non-C locale
> which causes elfdump to produce translated headers and confuses
> make_sunver.pl.  The following patch fixes this; tested manually by
> setting LANG=de in the environment before building
> libstdc++-symbols.ver-sun.
> 
> Ok for mainline?
> 
> 	Rainer
> 
> 
> 2013-02-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* make_sunver.pl: Enforce C locale.
> 
> 
> 
> 

Ok.

Paolo

Patch hide | download patch | download mbox

# HG changeset patch
# Parent 90cb0a60040295301d4f7ce9e873a0b940f00a36
Make make_sunver.pl robust against non-C locales

diff --git a/contrib/make_sunver.pl b/contrib/make_sunver.pl
--- a/contrib/make_sunver.pl
+++ b/contrib/make_sunver.pl
@@ -19,6 +19,10 @@ 
 use FileHandle;
 use IPC::Open2;
 
+# Enforce C locale.
+$ENV{'LC_ALL'} = "C";
+$ENV{'LANG'} = "C";
+
 # Input version script, GNU style.
 my $symvers = shift;