[LTP] [PATCH 1/3] Makefile: set LC_ALL and LANG to C
Richard Palethorpe
rpalethorpe@suse.de
Mon Nov 7 12:41:15 CET 2022
Hello,
Akihiko Odaki <akihiko.odaki@daynix.com> writes:
> On 2022/10/21 20:53, Petr Vorel wrote:
>> * have reproducible builds (no locale dependencies)
>> * English only output - easier to debug problem
>> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>> ---
>> NOTE: if we want to have only reproducible build, but keep localized
>> messages, we could use kernel approach:
>> unexport LC_ALL
>> LC_COLLATE=C
>> LC_NUMERIC=C
>> export LC_COLLATE LC_NUMERIC
>> They deliberately kept LC_CTYPE to have localized messages.
>> See also
>> c051346b7db2 ("Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C")
>> 07105202bdeb ("Makefile: do not override LC_CTYPE")
I would prefer to copy the kernel. If someone sends us compilation
messages in a language we don't understand then we can ask them to set
the locale before compiling.
I think ensuring our build scripts produce the same executable output on
different locales is nice though.
>> Makefile | 4 ++++
>> 1 file changed, 4 insertions(+)
>> diff --git a/Makefile b/Makefile
>> index d4399bae6..ea11ac7f3 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -21,6 +21,10 @@
>> # Ngie Cooper, July 2009
>> #
>> +# Avoid funny character set dependencies
>> +export LANG=C
>
> Hi,
>
> Setting LANG should not be necessary as long as LC_ALL is set. That is
> what my patch "tst_test.sh: Normalize the locale" does.
Yes, I don't understand what LANG is doing here. AFAICT it is just sets
a default for undefined settings and will be overrided by LC_ALL.
>
> Regards,
> Akihiko Odaki
>
>> +export LC_ALL=C
>> +
>> top_srcdir ?= $(CURDIR)
>> include $(top_srcdir)/include/mk/env_pre.mk
Setting to changes-requested in patchwork because of LANG and LC_ALL is
overkill IMO.
--
Thank you,
Richard.
More information about the ltp
mailing list