arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1380680-1.patch

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