This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Export LC_ALL=C (Re: Sorting in nm and testsuite)
On Tue, Jun 25, 2002 at 01:49:22PM -0700, H. J. Lu wrote:
> On Tue, Jun 25, 2002 at 03:01:18PM -0400, Andrew Cagney wrote:
> > > On Tue, Jun 25, 2002 at 12:55:58PM -0400, Ben Elliston wrote:
> > >
> > >> >>>>> "HJ" == H J Lu <hjl@lucon.org> writes:
> > >
> > >>
> > >> HJ> There is a problem with
> > >> HJ> http://sources.redhat.com/ml/binutils/2002-06/msg00594.html
> > >>
> > >> [...]
> > >>
> > >> HJ> It may also cause problems for other scripts. I don't know what is the
> > >> HJ> best way to deal with it. Shouldn't we introduce a new option,
> > >> HJ> -L|--sort-locale?
> > >>
> > >> How about modifying the testsuite to run the tested programs in an
> > >> explicit locale?
> > >
> > >
> > > Are you going to modify all scripts which use nm? I am not talking
> > > about just the binutils testsuite.
> >
> > I believe this is the norm. If a script doesn't set the locale, and
> > just trusts that it is C, then the script is broken.
> >
>
> Here is a patch.
Please do this in tests which depend on it, not in the makefile. I'm
sure I'm not the only developer in the habit of typing 'runtest' with a
couple of options to get at a test.
> 2002-06-25 H.J. Lu <hjl@gnu.org>
>
> * Makefile.in (check-DEJAGNU): Set LC_ALL=C and export it.
>
> --- binutils/binutils/Makefile.in.locale Tue Jun 18 20:43:45 2002
> +++ binutils/binutils/Makefile.in Tue Jun 25 13:46:24 2002
> @@ -932,6 +932,7 @@ check-DEJAGNU: site.exp
> TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
> export TCL_LIBRARY; \
> fi; \
> + LC_ALL=C; export LC_ALL; \
> runtest=$(RUNTEST); \
> if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
> CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \
> --- binutils/gas/Makefile.in.locale Tue Jun 18 20:43:50 2002
> +++ binutils/gas/Makefile.in Tue Jun 25 13:45:13 2002
> @@ -2802,6 +2802,7 @@ check-DEJAGNU: site.exp
> TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
> export TCL_LIBRARY; \
> fi; \
> + LC_ALL=C; export LC_ALL; \
> runtest=$(RUNTEST); \
> cd testsuite; \
> if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
> --- binutils/ld/Makefile.in.locale Tue Jun 18 20:44:30 2002
> +++ binutils/ld/Makefile.in Tue Jun 25 13:46:12 2002
> @@ -1564,6 +1564,7 @@ check-DEJAGNU: site.exp
> TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
> export TCL_LIBRARY; \
> fi; \
> + LC_ALL=C; export LC_ALL; \
> runtest=$(RUNTEST); \
> if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
> $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer