public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: dg-error vs. i18n?
       [not found]   ` <Pine.LNX.4.64.0910232305540.30905@digraph.polyomino.org.uk>
@ 2009-11-16  3:24     ` Dave Korn
  2009-11-30 20:24       ` [PING] " Dave Korn
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Korn @ 2009-11-16  3:24 UTC (permalink / raw)
  To: GCC Patches; +Cc: Dave Korn

[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]

[ Ref: http://gcc.gnu.org/ml/gcc/2009-10/threads.html#00480 ]

Joseph S. Myers wrote:
> On Sat, 24 Oct 2009, Richard Guenther wrote:
> 
>> The testsuite should run with C locale.
> 
> Unfortunately it appears there are now some systems where C no longer 
> implies ASCII, causing problems for predictability of output.  So the 
> testsuite may need to check the host and use other host-specific names 
> (C.US-ASCII?) in some cases.

  So, that's what this patch does; I just added an ishost test to all the
sites where LANG and LC_ALL are initialised.

libgomp/ChangeLog

	* testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
	settings for LC_ALL and LANG.

gcc/testsuite/ChangeLog

	* lib/g++.exp (g++_init): Likewise.
	* lib/gcc-dg.exp: Likewise.
	* lib/options.exp: Likewise.
	* lib/objc.exp (objc_init): Likewise.
	* lib/gfortran.exp (gfortran_init): Likewise.

libjava/ChangeLog

	* testsuite/lib/libjava.exp (libjava_init):  Likewise.


  Test results are up at:
    http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg01432.html
and are now looking how they did before cygwin recently switched to default
UTF-8 encoding; see for example:
    http://gcc.gnu.org/ml/gcc-testresults/2009-10/msg02216.html
for comparison.

  OK for head?

    cheers,
      DaveK


[-- Attachment #2: testsuitecygi18n.diff --]
[-- Type: text/x-c, Size: 5149 bytes --]

Index: libgomp/testsuite/lib/libgomp.exp
===================================================================
--- libgomp/testsuite/lib/libgomp.exp	(revision 154010)
+++ libgomp/testsuite/lib/libgomp.exp	(working copy)
@@ -66,6 +66,13 @@ proc libgomp_init { args } {
     setenv LC_ALL C
     setenv LANG C
 
+    # Many hosts now default to a non-ASCII C locale, however, so
+    # they can set a charset encoding here if they need.
+    if { [ishost "*-*-cygwin*"] } {
+      setenv LC_ALL C.ASCII
+      setenv LANG C.ASCII
+    }
+
     if ![info exists GCC_UNDER_TEST] then {
 	if [info exists TOOL_EXECUTABLE] {
 	    set GCC_UNDER_TEST $TOOL_EXECUTABLE
Index: gcc/testsuite/lib/g++.exp
===================================================================
--- gcc/testsuite/lib/g++.exp	(revision 154010)
+++ gcc/testsuite/lib/g++.exp	(working copy)
@@ -193,6 +193,13 @@ proc g++_init { args } {
     setenv LC_ALL C
     setenv LANG C
 
+    # Many hosts now default to a non-ASCII C locale, however, so
+    # they can set a charset encoding here if they need.
+    if { [ishost "*-*-cygwin*"] } {
+      setenv LC_ALL C.ASCII
+      setenv LANG C.ASCII
+    }
+
     if ![info exists GXX_UNDER_TEST] then {
 	if [info exists TOOL_EXECUTABLE] {
 	    set GXX_UNDER_TEST $TOOL_EXECUTABLE
Index: gcc/testsuite/lib/gcc-dg.exp
===================================================================
--- gcc/testsuite/lib/gcc-dg.exp	(revision 154010)
+++ gcc/testsuite/lib/gcc-dg.exp	(working copy)
@@ -34,6 +34,13 @@ load_lib torture-options.exp
 setenv LC_ALL C
 setenv LANG C
 
+# Many hosts now default to a non-ASCII C locale, however, so
+# they can set a charset encoding here if they need.
+if { [ishost "*-*-cygwin*"] } {
+  setenv LC_ALL C.ASCII
+  setenv LANG C.ASCII
+}
+
 if [info exists TORTURE_OPTIONS] {
     set DG_TORTURE_OPTIONS $TORTURE_OPTIONS
 } else {
Index: gcc/testsuite/lib/options.exp
===================================================================
--- gcc/testsuite/lib/options.exp	(revision 154010)
+++ gcc/testsuite/lib/options.exp	(working copy)
@@ -18,6 +18,13 @@
 setenv LC_ALL C
 setenv LANG C
 
+# Many hosts now default to a non-ASCII C locale, however, so
+# they can set a charset encoding here if they need.
+if { [ishost "*-*-cygwin*"] } {
+  setenv LC_ALL C.ASCII
+  setenv LANG C.ASCII
+}
+
 # Run the LANGUAGE compiler with GCC_OPTIONS and inspect the compiler
 # output to make sure that they match the newline-separated patterns
 # in COMPILER_PATTERNS but not the patterns in COMPILER_NON_PATTERNS.
Index: gcc/testsuite/lib/objc.exp
===================================================================
--- gcc/testsuite/lib/objc.exp	(revision 154010)
+++ gcc/testsuite/lib/objc.exp	(working copy)
@@ -102,6 +102,13 @@ proc objc_init { args } {
     setenv LC_ALL C
     setenv LANG C
 
+    # Many hosts now default to a non-ASCII C locale, however, so
+    # they can set a charset encoding here if they need.
+    if { [ishost "*-*-cygwin*"] } {
+      setenv LC_ALL C.ASCII
+      setenv LANG C.ASCII
+    }
+
     if { $objc_initialized == 1 } { return; }
 
     if ![info exists OBJC_UNDER_TEST] then {
Index: gcc/testsuite/lib/gfortran.exp
===================================================================
--- gcc/testsuite/lib/gfortran.exp	(revision 154010)
+++ gcc/testsuite/lib/gfortran.exp	(working copy)
@@ -136,6 +136,13 @@ proc gfortran_init { args } {
     setenv LC_ALL C
     setenv LANG C
 
+    # Many hosts now default to a non-ASCII C locale, however, so
+    # they can set a charset encoding here if they need.
+    if { [ishost "*-*-cygwin*"] } {
+      setenv LC_ALL C.ASCII
+      setenv LANG C.ASCII
+    }
+
     if ![info exists GFORTRAN_UNDER_TEST] then {
 	if [info exists TOOL_EXECUTABLE] {
 	    set GFORTRAN_UNDER_TEST $TOOL_EXECUTABLE
Index: libstdc++-v3/testsuite/lib/libstdc++.exp
===================================================================
--- libstdc++-v3/testsuite/lib/libstdc++.exp	(revision 154010)
+++ libstdc++-v3/testsuite/lib/libstdc++.exp	(working copy)
@@ -97,6 +97,13 @@ proc libstdc++_init { testfile } {
     setenv LC_ALL C
     setenv LANG C
 
+    # Many hosts now default to a non-ASCII C locale, however, so
+    # they can set a charset encoding here if they need.
+    if { [ishost "*-*-cygwin*"] } {
+      setenv LC_ALL C.ASCII
+      setenv LANG C.ASCII
+    }
+
     set blddir [lookfor_file [get_multilibs] libstdc++-v3]
     set flags_file "${blddir}/scripts/testsuite_flags"
     v3track flags_file 2
Index: libjava/testsuite/lib/libjava.exp
===================================================================
--- libjava/testsuite/lib/libjava.exp	(revision 154010)
+++ libjava/testsuite/lib/libjava.exp	(working copy)
@@ -145,6 +145,13 @@ proc libjava_init { args } {
     setenv LC_ALL C
     setenv LANG C
 
+    # Many hosts now default to a non-ASCII C locale, however, so
+    # they can set a charset encoding here if they need.
+    if { [ishost "*-*-cygwin*"] } {
+      setenv LC_ALL C.ASCII
+      setenv LANG C.ASCII
+    }
+
     if { $libjava_initialized == 1 } { return; }
 
     if ![info exists GCJ_UNDER_TEST] {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PING] Re: dg-error vs. i18n?
  2009-11-16  3:24     ` dg-error vs. i18n? Dave Korn
@ 2009-11-30 20:24       ` Dave Korn
  2009-11-30 20:41         ` Kaveh R. GHAZI
  2009-11-30 22:50         ` Janis Johnson
  0 siblings, 2 replies; 6+ messages in thread
From: Dave Korn @ 2009-11-30 20:24 UTC (permalink / raw)
  To: Dave Korn; +Cc: GCC Patches

Dave Korn wrote:
> [ Ref: http://gcc.gnu.org/ml/gcc/2009-10/threads.html#00480 ]

  OP, patch at http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00751.html

> libgomp/ChangeLog
> 
> 	* testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
> 	settings for LC_ALL and LANG.
> 
> gcc/testsuite/ChangeLog
> 
> 	* lib/g++.exp (g++_init): Likewise.
> 	* lib/gcc-dg.exp: Likewise.
> 	* lib/options.exp: Likewise.
> 	* lib/objc.exp (objc_init): Likewise.
> 	* lib/gfortran.exp (gfortran_init): Likewise.
> 
> libjava/ChangeLog
> 
> 	* testsuite/lib/libjava.exp (libjava_init):  Likewise.
> 
> 
>   Test results are up at:
>     http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg01432.html
> and are now looking how they did before cygwin recently switched to default
> UTF-8 encoding; see for example:
>     http://gcc.gnu.org/ml/gcc-testresults/2009-10/msg02216.html
> for comparison.
> 
>   OK for head?

  Ping?

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PING] Re: dg-error vs. i18n?
  2009-11-30 20:24       ` [PING] " Dave Korn
@ 2009-11-30 20:41         ` Kaveh R. GHAZI
  2009-11-30 23:36           ` Dave Korn
  2009-11-30 22:50         ` Janis Johnson
  1 sibling, 1 reply; 6+ messages in thread
From: Kaveh R. GHAZI @ 2009-11-30 20:41 UTC (permalink / raw)
  To: Dave Korn; +Cc: GCC Patches

On Mon, 30 Nov 2009, Dave Korn wrote:

> > libgomp/ChangeLog
> >
> > 	* testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
> > 	settings for LC_ALL and LANG.
> >
> > gcc/testsuite/ChangeLog
> >
> > 	* lib/g++.exp (g++_init): Likewise.
> > 	* lib/gcc-dg.exp: Likewise.
> > 	* lib/options.exp: Likewise.
> > 	* lib/objc.exp (objc_init): Likewise.
> > 	* lib/gfortran.exp (gfortran_init): Likewise.
> >
> > libjava/ChangeLog
> >
> > 	* testsuite/lib/libjava.exp (libjava_init):  Likewise.
> >

Someone reading an individual ChangeLog won't understand what "Likewise"
refers to in the latter two files above.  You have to repeat the explicit
description in each separate ChangeLog file at least once.

		--Kaveh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PING] Re: dg-error vs. i18n?
  2009-11-30 20:24       ` [PING] " Dave Korn
  2009-11-30 20:41         ` Kaveh R. GHAZI
@ 2009-11-30 22:50         ` Janis Johnson
       [not found]           ` <4B145A9B.4080905@gmail.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Janis Johnson @ 2009-11-30 22:50 UTC (permalink / raw)
  To: Dave Korn; +Cc: GCC Patches

On Mon, 2009-11-30 at 20:38 +0000, Dave Korn wrote:
> Dave Korn wrote:
> > [ Ref: http://gcc.gnu.org/ml/gcc/2009-10/threads.html#00480 ]
> 
>   OP, patch at http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00751.html
> 
> > libgomp/ChangeLog
> > 
> > 	* testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
> > 	settings for LC_ALL and LANG.
> > 
> > gcc/testsuite/ChangeLog
> > 
> > 	* lib/g++.exp (g++_init): Likewise.
> > 	* lib/gcc-dg.exp: Likewise.
> > 	* lib/options.exp: Likewise.
> > 	* lib/objc.exp (objc_init): Likewise.
> > 	* lib/gfortran.exp (gfortran_init): Likewise.
> > 
> > libjava/ChangeLog
> > 
> > 	* testsuite/lib/libjava.exp (libjava_init):  Likewise.
> > 
> > 
> >   Test results are up at:
> >     http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg01432.html
> > and are now looking how they did before cygwin recently switched to default
> > UTF-8 encoding; see for example:
> >     http://gcc.gnu.org/ml/gcc-testresults/2009-10/msg02216.html
> > for comparison.
> > 
> >   OK for head?
> 
>   Ping?

OK, with fixes to the ChangeLog entries as pointed out by Kaveh.

Janis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PING] Re: dg-error vs. i18n?
  2009-11-30 20:41         ` Kaveh R. GHAZI
@ 2009-11-30 23:36           ` Dave Korn
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Korn @ 2009-11-30 23:36 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Dave Korn, GCC Patches

Kaveh R. GHAZI wrote:
> On Mon, 30 Nov 2009, Dave Korn wrote:
> 
>>> libgomp/ChangeLog
>>>
>>> 	* testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
>>> 	settings for LC_ALL and LANG.
>>>
>>> gcc/testsuite/ChangeLog
>>>
>>> 	* lib/g++.exp (g++_init): Likewise.
>>> 	* lib/gcc-dg.exp: Likewise.
>>> 	* lib/options.exp: Likewise.
>>> 	* lib/objc.exp (objc_init): Likewise.
>>> 	* lib/gfortran.exp (gfortran_init): Likewise.
>>>
>>> libjava/ChangeLog
>>>
>>> 	* testsuite/lib/libjava.exp (libjava_init):  Likewise.
>>>
> 
> Someone reading an individual ChangeLog won't understand what "Likewise"
> refers to in the latter two files above.  You have to repeat the explicit
> description in each separate ChangeLog file at least once.

  ROFL, yes, of course!  I hope I would have spotted what I was doing when I
came to start cut and pasting those chunks into the actual changelogs but
thanks for pointing it out :)

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PING] Re: dg-error vs. i18n?
       [not found]           ` <4B145A9B.4080905@gmail.com>
@ 2009-12-01  0:04             ` Janis Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Janis Johnson @ 2009-12-01  0:04 UTC (permalink / raw)
  To: Dave Korn; +Cc: GCC Patches

On Mon, 2009-11-30 at 23:51 +0000, Dave Korn wrote:
> Janis Johnson wrote:
> 
> > 
> > OK, with fixes to the ChangeLog entries as pointed out by Kaveh.
> 
>   Thanks, committed, but I just realised I left a hunk out from that patch
> submission, because I had some other unrelated changes in the file at the
> time.  I've now removed those, leaving just this hunk that was missing from
> the last patch.
> 
> libstdc++-v3/ChangeLog:
> 
> 	* testsuite/lib/libstdc++.exp (libstdc++_init): Add host-dependent
> 	settings for LC_ALL and LANG.
> 
>   Ok as well?

OK.

Janis

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-01  0:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4AE235E4.2060005@gmail.com>
     [not found] ` <84fc9c000910231559y194a9ccfyfb9414f8ed04a361@mail.gmail.com>
     [not found]   ` <Pine.LNX.4.64.0910232305540.30905@digraph.polyomino.org.uk>
2009-11-16  3:24     ` dg-error vs. i18n? Dave Korn
2009-11-30 20:24       ` [PING] " Dave Korn
2009-11-30 20:41         ` Kaveh R. GHAZI
2009-11-30 23:36           ` Dave Korn
2009-11-30 22:50         ` Janis Johnson
     [not found]           ` <4B145A9B.4080905@gmail.com>
2009-12-01  0:04             ` Janis Johnson

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).