* gas testsuite vs. $LANG
@ 2012-05-07 9:22 Alan Modra
2012-05-07 10:08 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2012-05-07 9:22 UTC (permalink / raw)
To: binutils
If I enable NLS and have LANG=en_AU.UTF-8 here, I run into testsuite
failures due to "recognised" being spelled properly. ;-) This fixes
the problem, using a technique found in ld/Makefile.am. I'm applying
the same change to binutils/ too.
binutils/
* Makefile.am (check-DEJAGNU): Clear LC_COLLATE, LC_ALL and LANG.
* Makefile.in: Regenerate.
gas/
* Makefile.am (check-DEJAGNU): Clear LC_COLLATE, LC_ALL and LANG.
* Makefile.in: Regenerate.
Index: binutils/Makefile.am
===================================================================
RCS file: /cvs/src/src/binutils/Makefile.am,v
retrieving revision 1.132
diff -u -p -r1.132 Makefile.am
--- binutils/Makefile.am 13 Dec 2011 09:13:15 -0000 1.132
+++ binutils/Makefile.am 6 May 2012 07:15:52 -0000
@@ -158,6 +158,7 @@ CC_FOR_TARGET = ` \
check-DEJAGNU: site.exp
srcdir=`cd $(srcdir) && pwd`; export srcdir; \
r=`pwd`; export r; \
+ LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
Index: gas/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.197
diff -u -p -r1.197 Makefile.am
--- gas/Makefile.am 3 May 2012 13:11:57 -0000 1.197
+++ gas/Makefile.am 6 May 2012 07:15:56 -0000
@@ -393,6 +393,7 @@ check-DEJAGNU: site.exp
cp site.exp testsuite/site.exp
rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+ LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
EXPECT=${EXPECT} ; export EXPECT ; \
runtest=$(RUNTEST); \
cd testsuite; \
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gas testsuite vs. $LANG
2012-05-07 9:22 gas testsuite vs. $LANG Alan Modra
@ 2012-05-07 10:08 ` Andreas Schwab
2012-05-07 12:56 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2012-05-07 10:08 UTC (permalink / raw)
To: binutils
Alan Modra <amodra@gmail.com> writes:
> If I enable NLS and have LANG=en_AU.UTF-8 here, I run into testsuite
> failures due to "recognised" being spelled properly. ;-) This fixes
> the problem, using a technique found in ld/Makefile.am. I'm applying
> the same change to binutils/ too.
>
> binutils/
> * Makefile.am (check-DEJAGNU): Clear LC_COLLATE, LC_ALL and LANG.
> * Makefile.in: Regenerate.
Exporting LC_ALL=C should be enough. Since you aren't overriding
LC_MESSAGES you can still get spurious failures.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gas testsuite vs. $LANG
2012-05-07 10:08 ` Andreas Schwab
@ 2012-05-07 12:56 ` Alan Modra
2012-05-07 14:31 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2012-05-07 12:56 UTC (permalink / raw)
To: Andreas Schwab; +Cc: binutils
On Mon, May 07, 2012 at 12:08:12PM +0200, Andreas Schwab wrote:
> Exporting LC_ALL=C should be enough.
That's what I did at first, then saw the ld/Makefile approach and
decided to copy it.
> Since you aren't overriding
> LC_MESSAGES you can still get spurious failures.
Hmm, OK. Nobody has complained in 12 years about ld/Makefile. :)
If I'd dug into cvs history I'd have seen the ld/Makefile change came
from H.J. Lu and Andreas Jaeger. So it likely wasn't done that way to
suit some libc other than glibc, which is what I thought might have
been the case.
Does this look better to you?
binutils/
gas/
ld/
* Makefile.am (check_DEJAGNU): Export LC_ALL=C in place of other
LC and LANG environment vars.
* Makefile.in: Regenerate.
gas/testsuite/
* lib/gas-defs.exp (run_dump_test): Don't set LC_ALL here.
Index: binutils/Makefile.am
===================================================================
RCS file: /cvs/src/src/binutils/Makefile.am,v
retrieving revision 1.133
diff -u -p -r1.133 Makefile.am
--- binutils/Makefile.am 7 May 2012 09:21:48 -0000 1.133
+++ binutils/Makefile.am 7 May 2012 12:36:58 -0000
@@ -158,7 +158,7 @@ CC_FOR_TARGET = ` \
check-DEJAGNU: site.exp
srcdir=`cd $(srcdir) && pwd`; export srcdir; \
r=`pwd`; export r; \
- LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
+ LC_ALL=C; export LC_ALL; \
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
Index: gas/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.198
diff -u -p -r1.198 Makefile.am
--- gas/Makefile.am 7 May 2012 09:21:28 -0000 1.198
+++ gas/Makefile.am 7 May 2012 12:37:00 -0000
@@ -393,7 +393,7 @@ check-DEJAGNU: site.exp
cp site.exp testsuite/site.exp
rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
- LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
+ LC_ALL=C; export LC_ALL; \
EXPECT=${EXPECT} ; export EXPECT ; \
runtest=$(RUNTEST); \
cd testsuite; \
Index: gas/testsuite/lib/gas-defs.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/lib/gas-defs.exp,v
retrieving revision 1.45
diff -u -p -r1.45 gas-defs.exp
--- gas/testsuite/lib/gas-defs.exp 18 Apr 2011 13:43:21 -0000 1.45
+++ gas/testsuite/lib/gas-defs.exp 7 May 2012 12:37:04 -0000
@@ -738,19 +738,9 @@ proc run_dump_test { name {extra_options
set redir ""
}
- # Ensure consistent sorting of symbols
- if {[info exists env(LC_ALL)]} {
- set old_lc_all $env(LC_ALL)
- }
- set env(LC_ALL) "C"
send_log "$cmd\n"
set status [gas_host_run "$cmd" "$redir"]
set comp_output [prune_warnings [lindex $status 1]]
- if {[info exists old_lc_all]} {
- set env(LC_ALL) $old_lc_all
- } else {
- unset env(LC_ALL)
- }
set comp_output [prune_warnings $comp_output]
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.313
diff -u -p -r1.313 Makefile.am
--- ld/Makefile.am 3 May 2012 13:12:04 -0000 1.313
+++ ld/Makefile.am 7 May 2012 12:37:06 -0000
@@ -2113,7 +2113,7 @@ TESTBFDLIB = @TESTBFDLIB@
check-DEJAGNU: site.exp
srcroot=`cd $(srcdir) && pwd`; export srcroot; \
r=`pwd`; export r; \
- LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
+ LC_ALL=C; export LC_ALL; \
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gas testsuite vs. $LANG
2012-05-07 12:56 ` Alan Modra
@ 2012-05-07 14:31 ` Andreas Schwab
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2012-05-07 14:31 UTC (permalink / raw)
To: binutils
Alan Modra <amodra@gmail.com> writes:
> On Mon, May 07, 2012 at 12:08:12PM +0200, Andreas Schwab wrote:
>> Exporting LC_ALL=C should be enough.
>
> That's what I did at first, then saw the ld/Makefile approach and
> decided to copy it.
>
>> Since you aren't overriding
>> LC_MESSAGES you can still get spurious failures.
>
> Hmm, OK. Nobody has complained in 12 years about ld/Makefile. :)
I'd guess most people who set LC_MESSAGES at all set it to en_US (to
override a non-english LANG).
> Does this look better to you?
Looks good to me.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-07 14:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 9:22 gas testsuite vs. $LANG Alan Modra
2012-05-07 10:08 ` Andreas Schwab
2012-05-07 12:56 ` Alan Modra
2012-05-07 14:31 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).