public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2896] libbacktrace: fix b2test_buildid test on non-english locales
@ 2021-08-13  6:30 Sergei Trofimovich
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2021-08-13  6:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:62e420293a293608f383d9b9c7f2debd666e9fc9

commit r12-2896-g62e420293a293608f383d9b9c7f2debd666e9fc9
Author: Sergei Trofimovich <siarheit@google.com>
Date:   Thu Aug 12 23:09:08 2021 +0100

    libbacktrace: fix b2test_buildid test on non-english locales
    
    On LANG=ru_RU.UTF-8 'b2test_buildid' test fails due to localized readelf
    output:
    
    $ LANG=ru_RU.UTF-8 readelf -n b2test | fgrep 4e37e8f
        ID сборки: 4e37e8fead8d6e8b0a9dc95ea25cd784dff3a393
    $ LANG=C readelf -n b2test | fgrep 4e37e8f
        Build ID: 4e37e8fead8d6e8b0a9dc95ea25cd784dff3a393
    
    libbacktrace/
    
            * install-debuginfo-for-buildid.sh.in: Force non-localized readelf
            output with LANG=C.

Diff:
---
 libbacktrace/install-debuginfo-for-buildid.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libbacktrace/install-debuginfo-for-buildid.sh.in b/libbacktrace/install-debuginfo-for-buildid.sh.in
index 1364779d703..91dfdfe89a4 100644
--- a/libbacktrace/install-debuginfo-for-buildid.sh.in
+++ b/libbacktrace/install-debuginfo-for-buildid.sh.in
@@ -47,7 +47,7 @@ mkdir_p="@MKDIR_P@"
 build_id_dir="$1"
 src="$2"
 
-buildid=$($readelf -n $src \
+buildid=$(LANG=C $readelf -n $src \
 	      | $grep "Build ID" \
 	      | $awk '{print $3}')


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-13  6:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13  6:30 [gcc r12-2896] libbacktrace: fix b2test_buildid test on non-english locales Sergei Trofimovich

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 read-only IMAP folder(s) and NNTP newsgroup(s).