This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] 18969 - multiple string test failures due to missing locale dependencies


On 12 Oct 2015 13:00, Florian Weimer wrote:
> On 10/12/2015 11:35 AM, Andreas Schwab wrote:
> > Martin Sebor <msebor@gmail.com> writes:
> > 
> >> diff --git a/string/Makefile b/string/Makefile
> >> index 8424a61..0d8df0b 100644
> >> --- a/string/Makefile
> >> +++ b/string/Makefile
> >> @@ -75,4 +75,13 @@ ifeq ($(run-built-tests),yes)
> >>  $(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
> >>         cmp $^ > $@; \
> >>         $(evaluate-test)
> >> +
> >> +LOCALES = de_DE.UTF-8 en_US.ISO-8859-1 en_US.UTF-8 tr_TR.ISO-8859-9 
> >> tr_TR.UTF-8
> >> +include ../gen-locales.mk
> >> +
> >> +$(objpfx)test-strcasecmp.out: $(gen-locales)
> >> +$(objpfx)test-strncasecmp.out: $(gen-locales)
> >> +$(objpfx)tst-strxfrm.out: $(gen-locales)
> >> +$(objpfx)tst-strxfrm2.out: $(gen-locales)
> > 
> > What happens if there are multiple calls to gen-locales.sh in parallel
> > from different directories?
> 
> Are you concerned that make will not serialize them properly because the
> build system relies on recursive make invocations?
> 
> This could indeed be a problem.  I'm not sure what's the best way to
> tackle that.

pretty sure that's not a problem.  $(gen-locales) expands into:
CTYPE_FILES = $(addsuffix /LC_CTYPE,$(LOCALES))
gen-locales := $(addprefix $(common-objpfx)localedata/,$(CTYPE_FILES))

so it creates one dep per locale.  the rule for processing these targets:
$(addprefix $(common-objpfx)localedata/,$(CTYPE_FILES)): %: \
  ../localedata/gen-locale.sh \
  $(common-objpfx)locale/localedef \
  ../localedata/Makefile \
  $(addprefix ../localedata/charmaps/,$(CHARMAPS)) \
  $(addprefix ../localedata/locales/,$(LOCALE_SRCS))
    @$(SHELL) ../localedata/gen-locale.sh $(common-objpfx) \
          '$(built-program-cmd-before-env)' '$(run-program-env)' \
          '$(built-program-cmd-after-env)' $@; \
    $(evaluate-test)

so it generates one locale per invocation.  it looks correct to me.

then again, it's fairly easy to test: just go into one of these dirs,
delete the locale output, and run `make -j`.  see if any of the commands
are repeated.
-mike

Attachment: signature.asc
Description: Digital signature


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