arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh950093.patch

147e83
#
147e83
# All patches are from upstream and provide support for correct lib
147e83
# directory for AArch64.
147e83
#
147e83
# From 37bf2f1f983e37c0d87a1e34cd3d8a228ead5e16 Mon Sep 17 00:00:00 2001
147e83
# From: Andreas Schwab <schwab@suse.de>
147e83
# Date: Thu, 4 Apr 2013 12:22:22 -0400
147e83
# Subject: [PATCH 2/4] Add support for rtld directory different from slib
147e83
#  directory
147e83
# 
147e83
# ---
147e83
#  ChangeLog         | 15 +++++++++++++++
147e83
#  Makeconfig        | 10 ++++++++--
147e83
#  Makerules         |  4 ++--
147e83
#  config.make.in    |  1 +
147e83
#  configure         |  2 ++
147e83
#  configure.in      |  1 +
147e83
#  elf/Makefile      | 11 ++++++-----
147e83
#  scripts/rellns-sh | 17 +++++++++++++++--
147e83
#  8 files changed, 50 insertions(+), 11 deletions(-)
147e83
# 
147e83
# From 937dd2d4a5da7d51b87261b037e22dfca05face7 Mon Sep 17 00:00:00 2001
147e83
# From: Marcus Shawcroft <marcus.shawcroft@linaro.org>
147e83
# Date: Thu, 4 Apr 2013 12:26:55 -0400
147e83
# Subject: [PATCH 4/4] Correct missed use of $(rtlddir).
147e83
# 
147e83
# ---
147e83
#  ChangeLog | 4 ++++
147e83
#  Makerules | 2 +-
147e83
#  2 files changed, 5 insertions(+), 1 deletion(-)
147e83
# 
147e83
# From bcce68c6dc678b443e7f140d664ba1fa49c0ceaa Mon Sep 17 00:00:00 2001
147e83
# From: Andreas Schwab <schwab@suse.de>
147e83
# Date: Thu, 4 Apr 2013 12:23:43 -0400
147e83
# Subject: [PATCH 3/4] aarch64: Move rtld link to /lib
147e83
# 
147e83
# ---
147e83
#  ports/ChangeLog.aarch64                            | 6 ++++++
147e83
#  ports/sysdeps/unix/sysv/linux/aarch64/configure    | 1 +
147e83
#  ports/sysdeps/unix/sysv/linux/aarch64/configure.in | 1 +
147e83
#  3 files changed, 8 insertions(+)
147e83
# 
147e83
# From 05bc48a20b8c20574bc59a048750f0dd77fd6e23 Mon Sep 17 00:00:00 2001
147e83
# From: Andreas Schwab <schwab@suse.de>
147e83
# Date: Thu, 4 Apr 2013 12:02:53 -0400
147e83
# Subject: [PATCH 1/4] aarch64: use lib64 as default lib and slib directory
147e83
# 
147e83
# ---
147e83
#  ports/ChangeLog.aarch64                            |  6 ++++++
147e83
#  ports/sysdeps/unix/sysv/linux/aarch64/configure    | 13 +++++++++++++
147e83
#  ports/sysdeps/unix/sysv/linux/aarch64/configure.in | 12 ++++++++++++
147e83
#  3 files changed, 31 insertions(+)
147e83
# 
147e83
# commit 446737706c186b33529a2c07fcb6f0cc10b2d1ea
147e83
# Author: Andreas Schwab <schwab@suse.de>
147e83
# Date:   Tue Mar 19 10:13:46 2013 +0100
147e83
#
147e83
#    s390x: Move rtld link to /lib
147e83
#
147e83
diff -urN glibc-2.17-c758a686/config.make.in glibc-2.17-c758a686/config.make.in
147e83
--- glibc-2.17-c758a686/config.make.in	2013-10-28 10:56:39.996320904 -0400
147e83
+++ glibc-2.17-c758a686/config.make.in	2013-10-28 10:56:57.773317467 -0400
147e83
@@ -11,6 +11,7 @@
147e83
 datadir = @datadir@
147e83
 libdir = @libdir@
147e83
 slibdir = @libc_cv_slibdir@
147e83
+rtlddir = @libc_cv_rtlddir@
147e83
 localedir = @libc_cv_localedir@
147e83
 sysconfdir = @libc_cv_sysconfdir@
147e83
 libexecdir = @libexecdir@
147e83
diff -urN glibc-2.17-c758a686/configure glibc-2.17-c758a686/configure
147e83
--- glibc-2.17-c758a686/configure	2013-10-28 10:56:39.935320916 -0400
147e83
+++ glibc-2.17-c758a686/configure	2013-10-28 10:56:57.775317467 -0400
147e83
@@ -594,6 +594,7 @@
147e83
 libc_cv_localstatedir
147e83
 libc_cv_sysconfdir
147e83
 libc_cv_localedir
147e83
+libc_cv_rtlddir
147e83
 libc_cv_slibdir
147e83
 old_glibc_headers
147e83
 use_nscd
147e83
@@ -7600,6 +7601,7 @@
147e83
 
147e83
 
147e83
 
147e83
+
147e83
 
147e83
 
147e83
 
147e83
diff -urN glibc-2.17-c758a686/configure.in glibc-2.17-c758a686/configure.in
147e83
--- glibc-2.17-c758a686/configure.in	2013-10-28 10:56:39.902320923 -0400
147e83
+++ glibc-2.17-c758a686/configure.in	2013-10-28 10:56:57.776317467 -0400
147e83
@@ -2127,6 +2127,7 @@
147e83
 AC_SUBST(old_glibc_headers)
147e83
 
147e83
 AC_SUBST(libc_cv_slibdir)
147e83
+AC_SUBST(libc_cv_rtlddir)
147e83
 AC_SUBST(libc_cv_localedir)
147e83
 AC_SUBST(libc_cv_sysconfdir)
147e83
 AC_SUBST(libc_cv_localstatedir)
147e83
diff -urN glibc-2.17-c758a686/elf/Makefile glibc-2.17-c758a686/elf/Makefile
147e83
--- glibc-2.17-c758a686/elf/Makefile	2013-10-28 10:56:40.127320879 -0400
147e83
+++ glibc-2.17-c758a686/elf/Makefile	2013-10-28 10:56:57.776317467 -0400
147e83
@@ -66,7 +66,7 @@
147e83
 ifeq (yes,$(build-shared))
147e83
 extra-objs	= $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os
147e83
 generated	+= librtld.os dl-allobjs.os ld.so ldd
147e83
-install-others	= $(inst_slibdir)/$(rtld-installed-name)
147e83
+install-others = $(inst_rtlddir)/$(rtld-installed-name)
147e83
 install-bin-script = ldd
147e83
 endif
147e83
 
147e83
@@ -341,7 +341,7 @@
147e83
 	  | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
147e83
 
147e83
 # interp.c exists just to get this string into the libraries.
147e83
-CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
147e83
+CFLAGS-interp.c = -D'RUNTIME_LINKER="$(rtlddir)/$(rtld-installed-name)"' \
147e83
 		  -DNOT_IN_libc=1
147e83
 $(objpfx)interp.os: $(common-objpfx)config.make
147e83
 
147e83
@@ -373,18 +373,19 @@
147e83
 	$(make-target-directory)
147e83
 	$(do-install-program)
147e83
 
147e83
-$(inst_slibdir)/$(rtld-installed-name): \
147e83
+$(inst_rtlddir)/$(rtld-installed-name): \
147e83
   $(inst_slibdir)/$(rtld-version-installed-name) \
147e83
   $(inst_slibdir)/libc-$(version).so
147e83
+	$(make-target-directory)
147e83
 	$(make-shlib-link)
147e83
 
147e83
 # Special target called by parent to install just the dynamic linker.
147e83
 .PHONY: ldso_install
147e83
-ldso_install: $(inst_slibdir)/$(rtld-installed-name)
147e83
+ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
147e83
 endif
147e83
 
147e83
 
147e83
-common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
147e83
+common-ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
147e83
 		     -e 's%@VERSION@%$(version)%g' \
147e83
 		     -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
147e83
 		     -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g'
147e83
diff -urN glibc-2.17-c758a686/Makeconfig glibc-2.17-c758a686/Makeconfig
147e83
--- glibc-2.17-c758a686/Makeconfig	2013-10-28 10:56:40.434320820 -0400
147e83
+++ glibc-2.17-c758a686/Makeconfig	2013-10-28 10:56:57.772317467 -0400
147e83
@@ -148,12 +148,18 @@
147e83
 endif
147e83
 inst_libdir = $(install_root)$(libdir)
147e83
 
147e83
-# Where to install the shared library and dynamic linker.
147e83
+# Where to install the shared library.
147e83
 ifndef slibdir
147e83
 slibdir = $(exec_prefix)/lib
147e83
 endif
147e83
 inst_slibdir = $(install_root)$(slibdir)
147e83
 
147e83
+# Where to install the dynamic linker.
147e83
+ifndef rtlddir
147e83
+rtlddir = $(slibdir)
147e83
+endif
147e83
+inst_rtlddir = $(install_root)$(rtlddir)
147e83
+
147e83
 # Prefix to put on files installed in $(libdir).  For libraries `libNAME.a',
147e83
 # the prefix is spliced between `lib' and the name, so the linker switch
147e83
 # `-l$(libprefix)NAME' finds the library; for other files the prefix is
147e83
@@ -443,7 +449,7 @@
147e83
 endif
147e83
 ifndef config-LDFLAGS
147e83
 ifeq (yes,$(build-shared))
147e83
-config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
147e83
+config-LDFLAGS = -Wl,-dynamic-linker=$(rtlddir)/$(rtld-installed-name)
147e83
 endif
147e83
 endif
147e83
 ifndef link-libc
147e83
diff -urN glibc-2.17-c758a686/Makerules glibc-2.17-c758a686/Makerules
147e83
--- glibc-2.17-c758a686/Makerules	2013-10-28 10:56:39.928320918 -0400
147e83
+++ glibc-2.17-c758a686/Makerules	2013-10-28 10:56:57.777317467 -0400
147e83
@@ -873,7 +873,7 @@
147e83
 symbolic-link-prog := $(common-objpfx)elf/sln
147e83
 symbolic-link-list := $(common-objpfx)elf/symlink.list
147e83
 define make-shlib-link
147e83
-echo $(<F) $@ >> $(symbolic-link-list)
147e83
+echo `$(..)scripts/rellns-sh -p $< $@` $@ >> $(symbolic-link-list)
147e83
 endef
147e83
 else # cross-compiling
147e83
 # We need a definition that can be used by elf/Makefile's install rules.
147e83
@@ -883,7 +883,7 @@
147e83
 ifndef make-shlib-link
147e83
 define make-shlib-link
147e83
 rm -f $@
147e83
-$(LN_S) $(
147e83
+$(LN_S) `$(..)scripts/rellns-sh -p $< $@` $@
147e83
 endef
147e83
 endif
147e83
 
147e83
@@ -937,7 +937,7 @@
147e83
 	 cat $<; \
147e83
 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
147e83
 	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
147e83
-	      ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
147e83
+	      ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \
147e83
 	) > $@.new
147e83
 	mv -f $@.new $@
147e83
 
147e83
diff -urN glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure
147e83
--- glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure	2013-10-28 10:56:39.873320928 -0400
147e83
+++ glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure	2013-10-28 10:57:26.270311964 -0400
147e83
@@ -1,3 +1,17 @@
147e83
 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
147e83
+ # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
147e83
 
147e83
 arch_minimum_kernel=3.7.0
147e83
+
147e83
+test -n "$libc_cv_slibdir" ||
147e83
+case "$prefix" in
147e83
+  /usr | /usr/)
147e83
+    libc_cv_slibdir="/lib64"
147e83
+    libc_cv_rtlddir="/lib"
147e83
+    if test "$libdir" = '${exec_prefix}/lib'; then
147e83
+      libdir='${exec_prefix}/lib64';
147e83
+      # Locale data can be shared between 32bit and 64bit libraries
147e83
+      libc_cv_localedir='${exec_prefix}/lib/locale'
147e83
+    fi
147e83
+    ;;
147e83
+esac
147e83
diff -urN glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure.in glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
147e83
--- glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure.in	2013-10-28 10:56:39.873320928 -0400
147e83
+++ glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/configure.in	2013-10-28 10:57:49.162307556 -0400
147e83
@@ -2,3 +2,16 @@
147e83
 # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
147e83
 
147e83
 arch_minimum_kernel=3.7.0
147e83
+
147e83
+test -n "$libc_cv_slibdir" ||
147e83
+case "$prefix" in
147e83
+  /usr | /usr/)
147e83
+    libc_cv_slibdir="/lib64"
147e83
+    libc_cv_rtlddir="/lib"
147e83
+    if test "$libdir" = '${exec_prefix}/lib'; then
147e83
+      libdir='${exec_prefix}/lib64';
147e83
+      # Locale data can be shared between 32bit and 64bit libraries
147e83
+      libc_cv_localedir='${exec_prefix}/lib/locale'
147e83
+    fi
147e83
+    ;;
147e83
+esac
147e83
diff -urN glibc-2.17-c758a686/scripts/rellns-sh glibc-2.17-c758a686/scripts/rellns-sh
147e83
--- glibc-2.17-c758a686/scripts/rellns-sh	2013-10-28 10:56:40.081320888 -0400
147e83
+++ glibc-2.17-c758a686/scripts/rellns-sh	2013-10-28 10:56:57.776317467 -0400
147e83
@@ -16,8 +16,17 @@
147e83
 # You should have received a copy of the GNU General Public License
147e83
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
147e83
 
147e83
+# With -p, instead of creating the link print the computed relative link
147e83
+# name.
147e83
+do_print=false
147e83
+case $1 in
147e83
+  -p)
147e83
+    do_print=true
147e83
+    shift
147e83
+    ;;
147e83
+esac
147e83
 if test $# -ne 2; then
147e83
-  echo "Usage: rellns SOURCE DEST" >&2
147e83
+  echo "Usage: rellns [-p] SOURCE DEST" >&2
147e83
   exit 1
147e83
 fi
147e83
 
147e83
@@ -70,4 +79,8 @@
147e83
   from=`echo $from | sed 's%^[^/]*/*%%'`
147e83
 done
147e83
 
147e83
-ln -s $rfrom$to $2
147e83
+if $do_print; then
147e83
+  echo "$rfrom$to"
147e83
+else
147e83
+  ln -s $rfrom$to $2
147e83
+fi
147e83
diff --git glibc-2.17-c758a686/sysdeps/gnu/configure glibc-2.17-c758a686/sysdeps/gnu/configure
147e83
index 26327ca..70aaa90 100644
147e83
--- glibc-2.17-c758a686/sysdeps/gnu/configure
147e83
+++ glibc-2.17-c758a686/sysdeps/gnu/configure
147e83
@@ -9,12 +9,17 @@
147e83
 case "$prefix" in
147e83
 /usr | /usr/)
147e83
   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
147e83
-  # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
147e83
-  # and libc_cv_localedir.
147e83
+  # Allow earlier configure scripts to handle libc_cv_slibdir,
147e83
+  # libc_cv_rtlddir, libdir, and libc_cv_localedir.
147e83
   test -n "$libc_cv_slibdir" || \
147e83
   case $machine in
147e83
   sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
147e83
     libc_cv_slibdir=/lib64
147e83
+    case $machine in
147e83
+    s390/s390-64)
147e83
+      libc_cv_rtlddir=/lib
147e83
+      ;;
147e83
+    esac
147e83
     if test "$libdir" = '${exec_prefix}/lib'; then
147e83
       libdir='${exec_prefix}/lib64';
147e83
       # Locale data can be shared between 32bit and 64bit libraries
147e83
diff --git glibc-2.17-c758a686/sysdeps/gnu/configure.in glibc-2.17-c758a686/sysdeps/gnu/configure.in
147e83
index b8fd74c..ce251df 100644
147e83
--- glibc-2.17-c758a686/sysdeps/gnu/configure.in
147e83
+++ glibc-2.17-c758a686/sysdeps/gnu/configure.in
147e83
@@ -9,12 +9,17 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
147e83
 case "$prefix" in
147e83
 /usr | /usr/)
147e83
   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
147e83
-  # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
147e83
-  # and libc_cv_localedir.
147e83
+  # Allow earlier configure scripts to handle libc_cv_slibdir,
147e83
+  # libc_cv_rtlddir, libdir, and libc_cv_localedir.
147e83
   test -n "$libc_cv_slibdir" || \
147e83
   case $machine in
147e83
   sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
147e83
     libc_cv_slibdir=/lib64
147e83
+    case $machine in
147e83
+    s390/s390-64)
147e83
+      libc_cv_rtlddir=/lib
147e83
+      ;;
147e83
+    esac
147e83
     if test "$libdir" = '${exec_prefix}/lib'; then
147e83
       libdir='${exec_prefix}/lib64';
147e83
       # Locale data can be shared between 32bit and 64bit libraries