From patchwork Tue Feb 26 15:25:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [build] Make make_sunver.pl robust against non-C locales Date: Tue, 26 Feb 2013 05:25:59 -0000 From: Rainer Orth X-Patchwork-Id: 223237 Message-Id: To: gcc-patches@gcc.gnu.org Cc: Paolo Bonzini 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 * make_sunver.pl: Enforce C locale. # 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;