I'm a bit rusty at gdb, but here's what I've been able to find:
I compiled coreutils with -ggdb3 and was able to see, that the test called gl_locale_name_posix, which used my systems current setlocale (do debugging symbols):
Breakpoint 5, 0x00007ffff7a582b4 in setlocale () from /usr/lib/libc.so.6
(gdb) step
Single stepping until exit from function setlocale,
which has no line number information.
gl_locale_name_posix (category=5, categoryname=0x4035f3 "LC_MESSAGES") at localename.c:2704
2704 }
(gdb)
gl_locale_name (category=5, categoryname=0x4035f3 "LC_MESSAGES") at localename.c:2854
2854 if (retval != NULL)
(gdb)
2855 return retval;
(gdb)
2858 }
(gdb)
test-localename.c:86: assertion 'strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), gl_locale_name_default ()) == 0' failed
retval from setlocale is:
(gdb) p retval
$11 = 0x606f00 "en_US.UTF-8"
So I'm unsure what to do next?
My GNU libc version is:
% pacman -Qi glibc
Name : glibc
Version : 2.19-5
Description : GNU C Library
Architecture : x86_64
[ ... ]
Build Date : 2014-05-16T10:15:30 CEST
Install Date : 2014-05-30T16:11:30 CEST
Thanks,
Henrik