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