summaryrefslogtreecommitdiff
path: root/patches/glibc/2.25
diff options
context:
space:
mode:
Diffstat (limited to 'patches/glibc/2.25')
-rw-r--r--patches/glibc/2.25/110-sh-fix-gcc6.patch28
-rw-r--r--patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch30
-rw-r--r--patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch49
-rw-r--r--patches/glibc/2.25/910-typedef-caddr.patch15
-rw-r--r--patches/glibc/2.25/960-sh4-trap-divdi3.patch340
-rw-r--r--patches/glibc/2.25/961-sparc-extra-plt-call.patch65
6 files changed, 0 insertions, 527 deletions
diff --git a/patches/glibc/2.25/110-sh-fix-gcc6.patch b/patches/glibc/2.25/110-sh-fix-gcc6.patch
deleted file mode 100644
index cacf390..0000000
--- a/patches/glibc/2.25/110-sh-fix-gcc6.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 279acf7a059f2d2296f690d7f2d886bd0e404f30 Mon Sep 17 00:00:00 2001
-From: Alexey Neyman <stilor@att.net>
-Date: Wed, 25 Jan 2017 21:46:53 -0800
-Subject: [PATCH] sh: conditional is false in dl-conflict.c
-
-... ifdef it out, so that it doesn't create a call to abort().
-
-Signed-off-by: Alexey Neyman <stilor@att.net>
----
- sysdeps/sh/dl-machine.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
-index 449deea..2b468af 100644
---- a/sysdeps/sh/dl-machine.h
-+++ b/sysdeps/sh/dl-machine.h
-@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
- break;
- case R_SH_DIR32:
- {
--#ifndef RTLD_BOOTSTRAP
-+#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
- /* This is defined in rtld.c, but nowhere in the static
- libc.a; make the reference weak so static programs can
- still link. This declaration cannot be done when
---
-2.9.3
-
diff --git a/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch b/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch
deleted file mode 100644
index 59ab087..0000000
--- a/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001
-From: Alexey Neyman <stilor@att.net>
-Date: Tue, 24 Jan 2017 10:31:40 -0800
-Subject: [PATCH] Fix build with --enable-static-nss
-
-* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions
- match those around use, to avoid "defined but not used" error.
-
-Signed-off-by: Alexey Neyman <stilor@att.net>
----
- ChangeLog | 5 +++++
- nss/nsswitch.c | 2 +-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/nss/nsswitch.c b/nss/nsswitch.c
-index 0a65f6a..8f31658 100644
---- a/nss/nsswitch.c
-+++ b/nss/nsswitch.c
-@@ -94,7 +94,7 @@ static name_database *service_table;
- static name_database_entry *defconfig_entries;
-
-
--#ifdef USE_NSCD
-+#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED)
- /* Nonzero if this is the nscd process. */
- static bool is_nscd;
- /* The callback passed to the init functions when nscd is used. */
---
-2.9.3
-
diff --git a/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch
deleted file mode 100644
index fdc3a60..0000000
--- a/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001
-From: Alexey Neyman <stilor@att.net>
-Date: Wed, 8 Mar 2017 14:31:10 -0800
-Subject: [PATCH] Fix combreloc test with BSD grep
-
-The test for "-z combreloc" fails when cross-compiling on a machine
-that uses BSD grep (e.g. on macos). grep complains about empty
-subexpression and exits with non-zero status, which is interpreted
-by configure as "not found". As a result, support for "-z combreloc"
-(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC.
-
- * configure.ac: Avoid empty subexpression in grep.
-
-Signed-off-by: Alexey Neyman <stilor@att.net>
----
- ChangeLog | 5 +++++
- configure | 2 +-
- configure.ac | 2 +-
- 3 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index eecd0ac..0118bd1 100755
---- a/configure
-+++ b/configure
-@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- then
-- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
-+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then
- libc_cv_z_combreloc=yes
- else
- libc_cv_z_combreloc=no
-diff --git a/configure.ac b/configure.ac
-index 4a77411..19f6d87 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without
- dnl introducing new options this is not easily doable. Instead use a tool
- dnl which always is cross-platform: readelf. To detect whether -z combreloc
- dnl look for a section named .rel.dyn.
-- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
-+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then
- libc_cv_z_combreloc=yes
- else
- libc_cv_z_combreloc=no
---
-2.9.3
-
diff --git a/patches/glibc/2.25/910-typedef-caddr.patch b/patches/glibc/2.25/910-typedef-caddr.patch
deleted file mode 100644
index fc7979b..0000000
--- a/patches/glibc/2.25/910-typedef-caddr.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h
---- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500
-+++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500
-@@ -113,7 +113,10 @@
- #ifdef __USE_MISC
- # ifndef __daddr_t_defined
- typedef __daddr_t daddr_t;
-+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
- typedef __caddr_t caddr_t;
-+# define __caddr_t_defined
-+# endif
- # define __daddr_t_defined
- # endif
- #endif
-
diff --git a/patches/glibc/2.25/960-sh4-trap-divdi3.patch b/patches/glibc/2.25/960-sh4-trap-divdi3.patch
deleted file mode 100644
index 99fad46..0000000
--- a/patches/glibc/2.25/960-sh4-trap-divdi3.patch
+++ /dev/null
@@ -1,340 +0,0 @@
-commit db3d848e154b00071f4a5e729d5884efad410109
-Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-Date: Wed Mar 15 15:44:59 2017 -0300
-
- Build divdi3 only for architecture that required it
-
- As noted in [1], divdi3 object is only exported in a handful ABIs
- (i386, m68k, powerpc32, s390-32, and ia64), however it is built
- for all current architectures regardless.
-
- This patch refact the make rules for this object to so only the
- aforementioned architectures that actually require it builds it.
-
- Also, to avoid internal PLT calls to the exported symbol from the
- module, glibc uses an internal header (symbol-hacks.h) which is
- unrequired (and in fact breaks the build for architectures that
- intend to get symbol definitions from libgcc.a). The patch also
- changes it to create its own header (divdi3-symbol-hacks.h) and
- adjust the architectures that require it accordingly.
-
- I checked the build/check (with run-built-tests=no) on the
- following architectures (which I think must cover all supported
- ABI/builds) using GCC 6.3:
-
- aarch64-linux-gnu
- alpha-linux-gnu
- arm-linux-gnueabihf
- hppa-linux-gnu
- ia64-linux-gnu
- m68k-linux-gnu
- microblaze-linux-gnu
- mips64-n32-linux-gnu
- mips-linux-gnu
- mips64-linux-gnu
- nios2-linux-gnu
- powerpc-linux-gnu
- powerpc-linux-gnu-power4
- powerpc64-linux-gnu
- powerpc64le-linux-gnu
- s390x-linux-gnu
- s390-linux-gnu
- sh4-linux-gnu
- sh4-linux-gnu-soft
- sparc64-linux-gnu
- sparcv9-linux-gnu
- tilegx-linux-gnu
- tilegx-linux-gnu-32
- tilepro-linux-gnu
- x86_64-linux-gnu
- x86_64-linux-gnu-x32
- i686-linux-gnu
-
- I only saw one regression on sparcv9-linux-gnu (extra PLT call to
- .udiv) which I address in next patch in the set. It also correctly
- build SH with GCC 7.0.1 (without any regression from c89721e25d).
-
- [1] https://sourceware.org/ml/libc-alpha/2017-03/msg00243.html
-
- * sysdeps/i386/symbol-hacks.h: New file.
- * sysdeps/m68k/symbol-hacks.h: New file.
- * sysdeps/powerpc/powerpc32/symbol-hacks.h: New file.
- * sysdeps/s390/s390-32/symbol-hacks.h: New file.
- * sysdeps/unix/sysv/linux/i386/Makefile
- [$(subdir) = csu] (sysdep_routines): New rule: divdi3 object.
- [$(subdir) = csu] (sysdep-only-routines): Likewise.
- [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
- * sysdeps/unix/sysv/linux/m68k/Makefile
- [$(subdir) = csu] (sysdep_routines): Likewise.
- [$(subdir) = csu] (sysdep-only-routines): Likewise.
- [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
- [$(subdir) = csu] (sysdep_routines): Likewise.
- [$(subdir) = csu] (sysdep-only-routines): Likewise.
- [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-32/Makefile
- [$(subdir) = csu] (sysdep_routines): Likewise.
- [$(subdir) = csu] (sysdep-only-routines): Likewise.
- [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
- * sysdeps/wordsize-32/Makefile: Remove file.
- * sysdeps/wordsize-32/symbol-hacks.h: Definitions move to ...
- * sysdeps/wordsize-32/divdi3-symbol-hacks.h: ... here.
-
-diff --git a/sysdeps/i386/symbol-hacks.h b/sysdeps/i386/symbol-hacks.h
-new file mode 100644
-index 0000000000..36a13c83f7
---- /dev/null
-+++ b/sysdeps/i386/symbol-hacks.h
-@@ -0,0 +1,21 @@
-+/* Hacks needed for symbol manipulation. i386 version.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
-+
-+#include_next "symbol-hacks.h"
-diff --git a/sysdeps/m68k/symbol-hacks.h b/sysdeps/m68k/symbol-hacks.h
-new file mode 100644
-index 0000000000..e449d29810
---- /dev/null
-+++ b/sysdeps/m68k/symbol-hacks.h
-@@ -0,0 +1,21 @@
-+/* Hacks needed for symbol manipulation. m68k version.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
-+
-+#include_next "symbol-hacks.h"
-diff --git a/sysdeps/powerpc/powerpc32/symbol-hacks.h b/sysdeps/powerpc/powerpc32/symbol-hacks.h
-new file mode 100644
-index 0000000000..dbb3141621
---- /dev/null
-+++ b/sysdeps/powerpc/powerpc32/symbol-hacks.h
-@@ -0,0 +1,21 @@
-+/* Hacks needed for symbol manipulation. powerpc version.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
-+
-+#include_next "symbol-hacks.h"
-diff --git a/sysdeps/s390/s390-32/symbol-hacks.h b/sysdeps/s390/s390-32/symbol-hacks.h
-new file mode 100644
-index 0000000000..585c42365a
---- /dev/null
-+++ b/sysdeps/s390/s390-32/symbol-hacks.h
-@@ -0,0 +1,21 @@
-+/* Hacks needed for symbol manipulation. s390 version.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
-+
-+#include_next "symbol-hacks.h"
-diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile
-index 6aac0dfe15..4080b8c966 100644
---- a/sysdeps/unix/sysv/linux/i386/Makefile
-+++ b/sysdeps/unix/sysv/linux/i386/Makefile
-@@ -26,6 +26,11 @@ endif
-
- ifeq ($(subdir),csu)
- sysdep-dl-routines += sysdep
-+ifeq (yes,$(build-shared))
-+sysdep_routines += divdi3
-+shared-only-routines += divdi3
-+CPPFLAGS-divdi3.c = -Din_divdi3_c
-+endif
- endif
-
- ifeq ($(subdir),nptl)
-diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
-index 5c50ce6927..ce1f696a6f 100644
---- a/sysdeps/unix/sysv/linux/m68k/Makefile
-+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
-@@ -4,6 +4,11 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX
-
- ifeq ($(subdir),csu)
- sysdep_routines += m68k-helpers
-+ifeq (yes,$(build-shared))
-+sysdep_routines += divdi3
-+shared-only-routines += divdi3
-+CPPFLAGS-divdi3.c = -Din_divdi3_c
-+endif
- endif
-
- ifeq ($(subdir),misc)
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
-index 3d6c150582..1f45659ed1 100644
---- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
-@@ -1,2 +1,10 @@
- # See Makeconfig regarding the use of default-abi.
- default-abi := 32
-+
-+ifeq ($(subdir),csu)
-+ifeq (yes,$(build-shared))
-+sysdep_routines += divdi3
-+shared-only-routines += divdi3
-+CPPFLAGS-divdi3.c = -Din_divdi3_c
-+endif
-+endif
-diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
-index da3b3c76b4..fd8cf92633 100644
---- a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
-+++ b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
-@@ -21,3 +21,11 @@ endif
- ifeq ($(subdir),stdlib)
- sysdep_routines += __makecontext_ret
- endif
-+
-+ifeq ($(subdir),csu)
-+ifeq (yes,$(build-shared))
-+sysdep_routines += divdi3
-+shared-only-routines += divdi3
-+CPPFLAGS-divdi3.c = -Din_divdi3_c
-+endif
-+endif
-diff --git a/sysdeps/wordsize-32/Makefile b/sysdeps/wordsize-32/Makefile
-deleted file mode 100644
-index 82beac44ed..0000000000
---- a/sysdeps/wordsize-32/Makefile
-+++ /dev/null
-@@ -1,7 +0,0 @@
--ifeq ($(subdir),csu)
--ifeq (yes,$(build-shared))
--sysdep_routines += divdi3
--shared-only-routines += divdi3
--CPPFLAGS-divdi3.c = -Din_divdi3_c
--endif
--endif
-diff --git a/sysdeps/wordsize-32/divdi3-symbol-hacks.h b/sysdeps/wordsize-32/divdi3-symbol-hacks.h
-new file mode 100644
-index 0000000000..6c90cb796d
---- /dev/null
-+++ b/sysdeps/wordsize-32/divdi3-symbol-hacks.h
-@@ -0,0 +1,31 @@
-+/* Hacks needed for divdi3 symbol manipulation.
-+ Copyright (C) 2004-2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
-+ __moddi3, and __umoddi3. These functions are exported and
-+ therefore we get PLTs. Unnecessarily so. Changing gcc is a big
-+ task which might not be worth it so we play tricks with the
-+ assembler.
-+ Note: in_divdi3_c is only used to avoid symbol alias on divdi3
-+ build itself. */
-+#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED
-+asm ("__divdi3 = __divdi3_internal");
-+asm ("__udivdi3 = __udivdi3_internal");
-+asm ("__moddi3 = __moddi3_internal");
-+asm ("__umoddi3 = __umoddi3_internal");
-+#endif
-diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h
-deleted file mode 100644
-index 0aec1e0b97..0000000000
---- a/sysdeps/wordsize-32/symbol-hacks.h
-+++ /dev/null
-@@ -1,31 +0,0 @@
--/* Hacks needed for symbol manipulation.
-- Copyright (C) 2004-2017 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include_next "symbol-hacks.h"
--
--/* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
-- __moddi3, and __umoddi3. These functions are exported and
-- therefore we get PLTs. Unnecessarily so. Changing gcc is a big
-- task which might not be worth it so we play tricks with the
-- assembler. */
--#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED
--asm ("__divdi3 = __divdi3_internal");
--asm ("__udivdi3 = __udivdi3_internal");
--asm ("__moddi3 = __moddi3_internal");
--asm ("__umoddi3 = __umoddi3_internal");
--#endif
diff --git a/patches/glibc/2.25/961-sparc-extra-plt-call.patch b/patches/glibc/2.25/961-sparc-extra-plt-call.patch
deleted file mode 100644
index 3781cf0..0000000
--- a/patches/glibc/2.25/961-sparc-extra-plt-call.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-commit bdc543e338281da051b3dc06eae96c330a485ce6
-Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-Date: Thu Mar 16 09:15:57 2017 -0300
-
- sparc: Fix .udiv plt on libc
-
- With the removal of divdi3 object from sparcv9-linux-gnu build, its
- definition came from libgcc and its functions internall calls .udiv.
- Since glibc also exports these symbols for compatibility reasons, it
- will end up creating PLT calls internally in libc.so.
-
- To avoid it, this patch uses the linker option --wrap to replace all
- the internal libc.so .udiv calls to the wrapper __wrap_.udiv. Along
- with strong alias in the udiv implementations, it makes linker do
- local calls.
-
- Checked on sparcv9-linux-gnu.
-
- * sysdeps/sparc/sparc32/Makefile (libc.so-gnulib): New rule.
- * sysdeps/sparc/sparc32/sparcv8/udiv.S (.udiv): Make a strong_alias
- to __wrap_.udiv.
- * sysdeps/sparc/sparc32/sparcv9/udiv.S (.udiv): Likewise.
- * sysdeps/sparc/sparc32/udiv.S (.udiv): Likewise.
-
-diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile
-index da205898cf..14d6e03c6f 100644
---- a/sysdeps/sparc/sparc32/Makefile
-+++ b/sysdeps/sparc/sparc32/Makefile
-@@ -47,3 +47,9 @@ $(divrem:%=$(sysdep_dir)/sparc/sparc32/%.S): $(sysdep_dir)/sparc/sparc32/divrem.
- mv -f $@-tmp $@
-
- sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/sparc32/%.S)
-+
-+# libgcc __divdi3 and __moddi3 uses .udiv and since it is also exported by
-+# libc.so linker will create PLTs for the symbol. To avoid it we strong alias
-+# the exported libc one to __wrap_.udiv and use linker option --wrap to make any
-+# call to .udiv to call the wrapper symbol.
-+libc.so-gnulib += -Wl,--wrap=.udiv
-diff --git a/sysdeps/sparc/sparc32/sparcv8/udiv.S b/sysdeps/sparc/sparc32/sparcv8/udiv.S
-index d71954351e..e9cab4e4ef 100644
---- a/sysdeps/sparc/sparc32/sparcv8/udiv.S
-+++ b/sysdeps/sparc/sparc32/sparcv8/udiv.S
-@@ -13,3 +13,4 @@ ENTRY(.udiv)
- udiv %o0, %o1, %o0
-
- END(.udiv)
-+strong_alias (.udiv, __wrap_.udiv)
-diff --git a/sysdeps/sparc/sparc32/sparcv9/udiv.S b/sysdeps/sparc/sparc32/sparcv9/udiv.S
-index de79899756..368f85ede2 100644
---- a/sysdeps/sparc/sparc32/sparcv9/udiv.S
-+++ b/sysdeps/sparc/sparc32/sparcv9/udiv.S
-@@ -15,3 +15,4 @@ ENTRY(.udiv)
- udiv %o0, %o1, %o0
-
- END(.udiv)
-+strong_alias (.udiv, __wrap_.udiv)
-diff --git a/sysdeps/sparc/sparc32/udiv.S b/sysdeps/sparc/sparc32/udiv.S
-index 8dfff66158..ade0afdf40 100644
---- a/sysdeps/sparc/sparc32/udiv.S
-+++ b/sysdeps/sparc/sparc32/udiv.S
-@@ -344,3 +344,4 @@ LOC(got_result):
- mov %o2, %o0
-
- END(.udiv)
-+strong_alias (.udiv, __wrap_.udiv)