This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gas testsuite vs. $LANG


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]