]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Set locale related environment variables in debugglibc.sh
authorArjun Shankar <arjun@redhat.com>
Thu, 24 Sep 2020 12:58:36 +0000 (14:58 +0200)
committerArjun Shankar <arjun@redhat.com>
Thu, 24 Sep 2020 12:58:36 +0000 (14:58 +0200)
Tests and binaries that use locale related functions need to run in the
correct locale environment when being debugged via debugglibc.sh.  This
commit sets up the environment, specifically: GCONV_PATH, LOCPATH, and
LC_ALL for such tests and binaries when they are being debugged outside
of a test container.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Makefile

index 6dcfe40c25ebc265115cba0d8c1157b4bb52a57f..0fb5ffa1280cc17cf0f5605ea9b8cb4371b4a8de 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -305,6 +305,15 @@ then
   exit 1
 fi
 
+# Container tests needing locale data should install them in-container.
+# Other tests/binaries need to use locale data from the build tree.
+if [ "$$CONTAINER" = false ]
+then
+  ENVVARS="GCONV_PATH=$${BUILD_DIR}/iconvdata $$ENVVARS"
+  ENVVARS="LOCPATH=$${BUILD_DIR}/localedata $$ENVVARS"
+  ENVVARS="LC_ALL=C $$ENVVARS"
+fi
+
 # Expand environment setup command
 if [ -v ENVVARS ]
 then