diff options
author | Carlos O'Donell <carlos@redhat.com> | 2018-05-14 08:25:46 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2018-07-04 15:23:50 -0400 |
commit | 34fdb893e0cec55bdfc83ce56ab29b8f5eeaef9d (patch) | |
tree | da29e8497dccca329de28b8c4bc5bbe800dd6e1d /localedata/Makefile | |
parent | f2873d2da0ac9802e0b570e8e0b9e7e04a82bf55 (diff) | |
download | glibc-34fdb893e0cec55bdfc83ce56ab29b8f5eeaef9d.tar.gz glibc-34fdb893e0cec55bdfc83ce56ab29b8f5eeaef9d.tar.xz glibc-34fdb893e0cec55bdfc83ce56ab29b8f5eeaef9d.zip |
locale: XFAIL newlocale usage in static binary (Bug 23164)
There is a glibc optimization which allows for locale categories to be removed during static compilation. There have been various bugs for this support over the years, with bug 16915 being the most recent. The solution there was to emit a reference to all the categories to avoid any being removed. This fix, although it's in the generic __nl_langinfo_l function, doesn't appear to be enough to fix the case for a statically linked program that uses newlocale and nl_langinfo_l. This commit doesn't fix the problem, but it does add a XFAIL'd test case such that a fix can be applied against this and the XFAIL removed. It's not entirely clear that the problem is the same as that which was seen in bug 16915.
Diffstat (limited to 'localedata/Makefile')
-rw-r--r-- | localedata/Makefile | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/localedata/Makefile b/localedata/Makefile index d51064adec..2e6e0dcb2a 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -34,7 +34,9 @@ vpath %.h tests-mbwc test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \ - tst-ctype tst-langinfo tst-langinfo-static tst-numeric + tst-ctype tst-langinfo-newlocale tst-langinfo-setlocale \ + tst-langinfo-newlocale-static tst-langinfo-setlocale-static \ + tst-numeric # List of test input files (list sorted alphabetically): test-input := \ am_ET.UTF-8 \ @@ -168,13 +170,16 @@ install-others := $(addprefix $(inst_i18ndir)/, \ tests: $(objdir)/iconvdata/gconv-modules -tests-static += tst-langinfo-static +tests-static += tst-langinfo-newlocale-static tst-langinfo-setlocale-static ifeq ($(run-built-tests),yes) tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \ $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \ $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \ - $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \ + $(objpfx)tst-langinfo-newlocale.out \ + $(objpfx)tst-langinfo-setlocale.out \ + $(objpfx)tst-langinfo-newlocale-static.out \ + $(objpfx)tst-langinfo-setlocale-static.out \ $(objpfx)tst-numeric.out # We have to generate locales (list sorted alphabetically) LOCALES := \ @@ -332,18 +337,38 @@ $(objpfx)tst-ctype.out: tst-ctype.sh $(objpfx)tst-ctype \ $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \ '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \ $(evaluate-test) -$(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \ +$(objpfx)tst-langinfo-newlocale.out: tst-langinfo.sh \ + $(objpfx)tst-langinfo-newlocale \ $(objpfx)sort-test.out \ $(addprefix $(objpfx),$(CTYPE_FILES)) $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \ '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \ $(evaluate-test) -$(objpfx)tst-langinfo-static.out: tst-langinfo.sh $(objpfx)tst-langinfo-static \ +$(objpfx)tst-langinfo-newlocale-static.out: tst-langinfo.sh \ + $(objpfx)tst-langinfo-newlocale-static \ $(objpfx)sort-test.out \ $(addprefix $(objpfx),$(CTYPE_FILES)) $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \ '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \ $(evaluate-test) +# Static use of newlocale is known not to work. See Bug 23164. +test-xfail-tst-langinfo-newlocale-static = yes + +$(objpfx)tst-langinfo-setlocale.out: tst-langinfo.sh \ + $(objpfx)tst-langinfo-setlocale \ + $(objpfx)sort-test.out \ + $(addprefix $(objpfx),$(CTYPE_FILES)) + $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \ + '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \ + $(evaluate-test) +$(objpfx)tst-langinfo-setlocale-static.out: tst-langinfo.sh \ + $(objpfx)tst-langinfo-setlocale-static \ + $(objpfx)sort-test.out \ + $(addprefix $(objpfx),$(CTYPE_FILES)) + $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \ + '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \ + $(evaluate-test) + $(objpfx)tst-digits.out: $(objpfx)tst-locale.out $(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES)) endif |