···119119 if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
120120 ''
121121 echo SUPPORTED-LOCALES=C.UTF-8/UTF-8 > ../glibc-2*/localedata/SUPPORTED
122122- make -j''${NIX_BUILD_CORES:-1} localedata/install-locales
122122+ # Don't install C.utf-8 into the archive, but into $out/lib/locale: on non-NixOS
123123+ # systems with an empty /usr/lib/locale/locale-archive, glibc would fall back to
124124+ # $libdir/locale/C.utf-8 instead of the locale archive of pkgs.glibc. See also #347965.
125125+ make -j''${NIX_BUILD_CORES:-1} localedata/install-locale-files
123126 ''
124127 else
125128 lib.optionalString stdenv.buildPlatform.isLinux