After committing the patch I noticed a number of other similar
problems in other Makefiles. I tried to find a complete set by
grepping tests (files that match the tst*.c and test*.c shell
pattern) for calls to setlocale with a named locale, testing
a subset of those, and fixing the errors I got by making the
same tweaks to the Makefile as in the first patch. It's
possible I still missed some.
Attached is a follow-on patch with these tweaks.
Martin
PS In the process of this testing I ran into another, unrelated
problem. Some of the Makefiles add test output files to a variable
named tests-special. When make is invoked to build and run just
one or a few tests, the invocation fails with an error like the
one below. The error can be avoided by adding the .out files to
the variable only when the tests variable is defined in the
Makefile rather than on the command line. I haven't included
these fixes in this patch since it's an unrelated problem.
Instead, unless there are objections, I will post another patch
later to correct this problem.
make[2]: *** No rule to make target
`/build/glibc-trunk/power8/stdio-common/tst-printf-bz18872.out', needed
by `/build/glibc-trunk/power8/stdio-common/tst-printf-bz18872-mem.out'.
Stop.