00db10
From af67490e3e2ad2a32c1bcfac8923c025ac247518 Mon Sep 17 00:00:00 2001
00db10
From: Stefan Liebler <stli@linux.vnet.ibm.com>
00db10
Date: Mon, 7 Nov 2016 15:05:28 +0100
00db10
Subject: [PATCH 01/17] S390: Get rid of make warning: overriding recipe for
00db10
 target gconv-modules.
00db10
00db10
Upstream commit c70e9913d2fc2d0bf6a3ca98a4dece759d40a4ec
00db10
00db10
This patch introduces a way to provide an architecture dependent gconv-modules
00db10
file. Before this patch, the gconv-modules file was normally installed from
00db10
src-dir/iconvdata/gconv-modules. The S390 Makefile had overridden the
00db10
installation recipe (with a make warning) in order to install the
00db10
gconv-module-s390 file from build-dir.
00db10
The iconvdata/Makefile provides another recipe, which copies the gconv-modules
00db10
file from src to build dir, which are used by the testcases.
00db10
Thus the testcases does not use the currently build s390-modules.
00db10
00db10
This patch uses build-dir/iconvdata/gconv-modules for installation, which
00db10
is generated by concatenating src-dir/iconvdata/gconv-modules and the
00db10
architecture specific one. The latter one can be specified by setting the variable
00db10
sysdeps-gconv-modules in sysdeps/.../Makefile.
00db10
00db10
The architecture specific gconv-modules file is emitted before the common one
00db10
because these modules aren't used in all possible conversions. E.g. the converting
00db10
from INTERNAL to UTF-16 used the common UTF-16.so module instead of UTF16_UTF32_Z9.so.
00db10
00db10
This way, the s390-Makefile does not need to override the recipe for gconv-modules
00db10
and no warning is emitted anymore.
00db10
Since we no longer support empty objpfx the conditional test in iconvdata/Makefile
00db10
is removed.
00db10
00db10
ChangeLog:
00db10
00db10
	* iconvdata/Makefile ($(inst_gconvdir)/gconv-modules):
00db10
	Install file from $(objpfx)gconv-modules.
00db10
	($(objpfx)gconv-modules): Concatenate architecture specific file
00db10
	in variable sysdeps-gconv-modules and gconv-modules in src dir.
00db10
	* sysdeps/s390/gconv-modules: New file.
00db10
	* sysdeps/s390/s390-64/Makefile: ($(inst_gconvdir)/gconv-modules):
00db10
	Deleted.
00db10
	($(objpfx)gconv-modules-s390): Deleted.
00db10
	(sysdeps-gconv-modules): New variable.
00db10
---
00db10
 iconvdata/Makefile            |  6 ++---
00db10
 sysdeps/s390/gconv-modules    | 50 ++++++++++++++++++++++++++++++++++++++++++
00db10
 sysdeps/s390/s390-64/Makefile | 51 +------------------------------------------
00db10
 3 files changed, 53 insertions(+), 54 deletions(-)
00db10
 create mode 100644 sysdeps/s390/gconv-modules
00db10
00db10
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
00db10
index a99539e..e2624de 100644
00db10
--- a/iconvdata/Makefile
00db10
+++ b/iconvdata/Makefile
00db10
@@ -244,7 +244,7 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h))
00db10
 $(addprefix $(inst_gconvdir)/, $(modules.so)): \
00db10
     $(inst_gconvdir)/%: $(objpfx)% $(+force)
00db10
 	$(do-install-program)
00db10
-$(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
00db10
+$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force)
00db10
 	$(do-install)
00db10
 ifeq (no,$(cross-compiling))
00db10
 # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
00db10
@@ -319,7 +319,5 @@ do-tests-clean common-mostlyclean: tst-tables-clean
00db10
 tst-tables-clean:
00db10
 	-rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible
00db10
 
00db10
-ifdef objpfx
00db10
 $(objpfx)gconv-modules: gconv-modules
00db10
-	cp $^ $@
00db10
-endif
00db10
+	cat $(sysdeps-gconv-modules) $^ > $@
00db10
diff --git a/sysdeps/s390/gconv-modules b/sysdeps/s390/gconv-modules
00db10
new file mode 100644
00db10
index 0000000..7021105
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/gconv-modules
00db10
@@ -0,0 +1,50 @@
00db10
+# GNU libc iconv configuration.
00db10
+# Copyright (C) 1997-2016 Free Software Foundation, Inc.
00db10
+# This file is part of the GNU C Library.
00db10
+
00db10
+# The GNU C Library is free software; you can redistribute it and/or
00db10
+# modify it under the terms of the GNU Lesser General Public
00db10
+# License as published by the Free Software Foundation; either
00db10
+# version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+# The GNU C Library is distributed in the hope that it will be useful,
00db10
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+# Lesser General Public License for more details.
00db10
+
00db10
+# You should have received a copy of the GNU Lesser General Public
00db10
+# License along with the GNU C Library; if not, see
00db10
+# <http://www.gnu.org/licenses/>.
00db10
+
00db10
+# All lines contain the following information:
00db10
+
00db10
+# If the lines start with `module'
00db10
+#  fromset:	either a name triple or a regular expression triple.
00db10
+#  toset:	a name triple or an expression with \N to get regular
00db10
+#		expression matching results.
00db10
+#  filename:	filename of the module implementing the transformation.
00db10
+#		If it is not absolute the path is made absolute by prepending
00db10
+#		the directory the configuration file is found in.
00db10
+#  cost:	optional cost of the transformation.  Default is 1.
00db10
+
00db10
+# If the lines start with `alias'
00db10
+#  alias:	alias name which is not really recognized.
00db10
+#  name:	the real name of the character set
00db10
+
00db10
+# S/390 hardware accelerated modules
00db10
+#	from			to			module			cost
00db10
+module	ISO-8859-1//		IBM037//		ISO-8859-1_CP037_Z900	1
00db10
+module	IBM037//		ISO-8859-1//		ISO-8859-1_CP037_Z900	1
00db10
+module	ISO-10646/UTF8/		UTF-32//		UTF8_UTF32_Z9		1
00db10
+module	UTF-32BE//		ISO-10646/UTF8/		UTF8_UTF32_Z9		1
00db10
+module	ISO-10646/UTF8/		UTF-32BE//		UTF8_UTF32_Z9		1
00db10
+module	UTF-16BE//		UTF-32//		UTF16_UTF32_Z9		1
00db10
+module	UTF-32BE//		UTF-16//		UTF16_UTF32_Z9		1
00db10
+module	INTERNAL		UTF-16//		UTF16_UTF32_Z9		1
00db10
+module	UTF-32BE//		UTF-16BE//		UTF16_UTF32_Z9		1
00db10
+module	INTERNAL		UTF-16BE//		UTF16_UTF32_Z9		1
00db10
+module	UTF-16BE//		UTF-32BE//		UTF16_UTF32_Z9		1
00db10
+module	UTF-16BE//		INTERNAL		UTF16_UTF32_Z9		1
00db10
+module	UTF-16BE//		ISO-10646/UTF8/		UTF8_UTF16_Z9		1
00db10
+module	ISO-10646/UTF8/		UTF-16//		UTF8_UTF16_Z9		1
00db10
+module	ISO-10646/UTF8/		UTF-16BE//		UTF8_UTF16_Z9		1
00db10
diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile
00db10
index 939e947..bb958bd 100644
00db10
--- a/sysdeps/s390/s390-64/Makefile
00db10
+++ b/sysdeps/s390/s390-64/Makefile
00db10
@@ -39,54 +39,5 @@ $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) : \
00db10
 $(inst_gconvdir)/%.so: $(objpfx)%.so $(+force)
00db10
 	$(do-install-program)
00db10
 
00db10
-$(objpfx)gconv-modules-s390: gconv-modules $(+force)
00db10
-	cp $< $@
00db10
-	echo >> $@
00db10
-	echo "# S/390 hardware accelerated modules" >> $@
00db10
-	echo -n "module	ISO-8859-1//		IBM037//	" >> $@
00db10
-	echo "	ISO-8859-1_CP037_Z900	1" >> $@
00db10
-	echo -n "module	IBM037//		ISO-8859-1//	" >> $@
00db10
-	echo "	ISO-8859-1_CP037_Z900	1" >> $@
00db10
-	echo -n "module	ISO-10646/UTF8/		UTF-32//	" >> $@
00db10
-	echo "	UTF8_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	UTF-32BE//		ISO-10646/UTF8/	" >> $@
00db10
-	echo "	UTF8_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	ISO-10646/UTF8/		UTF-32BE//	" >> $@
00db10
-	echo "	UTF8_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	UTF-16BE//		UTF-32//	" >> $@
00db10
-	echo "	UTF16_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	UTF-32BE//		UTF-16//	" >> $@
00db10
-	echo "	UTF16_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	INTERNAL		UTF-16//	" >> $@
00db10
-	echo "	UTF16_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	UTF-32BE//		UTF-16BE//	" >> $@
00db10
-	echo "	UTF16_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	INTERNAL		UTF-16BE//	" >> $@
00db10
-	echo "	UTF16_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	UTF-16BE//		UTF-32BE//	" >> $@
00db10
-	echo "	UTF16_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	UTF-16BE//		INTERNAL	" >> $@
00db10
-	echo "	UTF16_UTF32_Z9		1" >> $@
00db10
-	echo -n "module	UTF-16BE//		ISO-10646/UTF8/	" >> $@
00db10
-	echo "	UTF8_UTF16_Z9		1" >> $@
00db10
-	echo -n "module	ISO-10646/UTF8/		UTF-16//	" >> $@
00db10
-	echo "	UTF8_UTF16_Z9		1" >> $@
00db10
-	echo -n "module	ISO-10646/UTF8/		UTF-16BE//	" >> $@
00db10
-	echo "	UTF8_UTF16_Z9		1" >> $@
00db10
-
00db10
-$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force)
00db10
-	$(do-install)
00db10
-ifeq (no,$(cross-compiling))
00db10
-# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
00db10
-# if this libc has more gconv modules than the previously installed one.
00db10
-	if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
00db10
-	   LC_ALL=C LANGUAGE=C \
00db10
-	   $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
00db10
-	   $(common-objpfx)iconv/iconvconfig \
00db10
-	     $(addprefix --prefix=,$(install_root)); \
00db10
-	fi
00db10
-else
00db10
-	@echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
00db10
-endif
00db10
-
00db10
+sysdeps-gconv-modules = ../sysdeps/s390/gconv-modules
00db10
 endif
00db10
-- 
00db10
1.8.3.1
00db10