path: root/usr
diff options
authorMasahiro Yamada <>2021-04-30 10:56:27 +0900
committerMasahiro Yamada <>2021-05-02 00:43:35 +0900
commit77a88274dc1a2cf3a775161d9a3242bc798ee680 (patch)
tree2352fd3b320c6801235ffb8c2cd80632c4fbfa69 /usr
parent885480b084696331bea61a4f7eba10652999a9c1 (diff)
kbuild: replace LANG=C with LC_ALL=C
LANG gives a weak default to each LC_* in case it is not explicitly defined. LC_ALL, if set, overrides all other LC_* variables. LANG < LC_CTYPE, LC_COLLATE, LC_MONETARY, LC_NUMERIC, ... < LC_ALL This is why documentation such as [1] suggests to set LC_ALL in build scripts to get the deterministic result. LANG=C is not strong enough to override LC_* that may be set by end users. [1]: Signed-off-by: Masahiro Yamada <> Acked-by: Michael Ellerman <> (powerpc) Reviewed-by: Matthias Maennich <> Acked-by: Matthieu Baerts <> (mptcp) Reviewed-by: Greg Kroah-Hartman <>
Diffstat (limited to 'usr')
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/ b/usr/
index 8ae831657e5d..63476bb70b41 100755
--- a/usr/
+++ b/usr/
@@ -147,7 +147,7 @@ dir_filelist() {
header "$1"
srcdir=$(echo "$1" | sed -e 's://*:/:g')
- dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort)
+ dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LC_ALL=C sort)
# If $dirlist is only one line, then the directory is empty
if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then