aboutsummaryrefslogtreecommitdiff
path: root/localedata/Makefile
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2014-05-16 00:06:54 +0200
committerAurelien Jarno <aurelien@aurel32.net>2014-05-20 18:43:14 +0200
commitae75a883f2eb312165d1e1f423cea320f3c92ef5 (patch)
treef8090d0119513e8880d097e588e0b8ef7b393c93 /localedata/Makefile
parentde9d8f2098caeb19684710a3c0774f4fe38a5e2c (diff)
downloadglibc-ae75a883f2eb312165d1e1f423cea320f3c92ef5.zip
glibc-ae75a883f2eb312165d1e1f423cea320f3c92ef5.tar.gz
glibc-ae75a883f2eb312165d1e1f423cea320f3c92ef5.tar.bz2
fix nl_langinfo with static linking (BZ #16915)
For static linking the locale code avoids linking code and data for unused categories. However for nl_langinfo we know only at runtime which categories are used, so direct reference to every nl_current_CATEGORY symbol should be done. This was broken by commit bc3e1c127392da88d0c8bf2ae728147982a3d1bc where nl_langinfo_l and nl_langinfo have been merged and some code has been lost in the process. In order to detect locales issues with static linking, compile a version of tst-langinfo with static linking. Note: this is Debian bug#747103 reported by Raphael <raphael.astier@eliot-sa.com>
Diffstat (limited to 'localedata/Makefile')
-rw-r--r--localedata/Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/localedata/Makefile b/localedata/Makefile
index 94562be..48ec3de 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -35,7 +35,7 @@ vpath %.h tests-mbwc
test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \
tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
- tst-ctype tst-wctype tst-langinfo tst-numeric
+ tst-ctype tst-wctype tst-langinfo tst-langinfo-static tst-numeric
test-input := de_DE.ISO-8859-1 en_US.ISO-8859-1 da_DK.ISO-8859-1 \
hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 tr_TR.UTF-8 fr_FR.UTF-8 \
si_LK.UTF-8
@@ -95,7 +95,9 @@ tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \
$(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \
$(objpfx)tst-trans.out $(objpfx)tst-mbswcs.out \
$(objpfx)tst-ctype.out $(objpfx)tst-wctype.out \
- $(objpfx)tst-langinfo.out $(objpfx)tst-numeric.out
+ $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \
+ $(objpfx)tst-numeric.out
+tests-static += tst-langinfo-static
ifeq ($(run-built-tests),yes)
# We have to generate locales
@@ -197,7 +199,12 @@ $(objpfx)tst-wctype.out: tst-wctype.sh $(objpfx)tst-wctype \
$(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) $< $(common-objpfx) '$(test-program-cmd)'; \
+ $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \
+ $(evaluate-test)
+$(objpfx)tst-langinfo-static.out: tst-langinfo.sh $(objpfx)tst-langinfo-static \
+ $(objpfx)sort-test.out \
+ $(addprefix $(objpfx),$(CTYPE_FILES))
+ $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \
$(evaluate-test)
$(objpfx)tst-digits.out: $(objpfx)tst-locale.out
$(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))