libc/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches
crosstool-ng's glibc patche is made against glibc/libc sub-dir.
changeset 3052:06b663f297 is against glibc top-dir. it needs to split.
Signed-off-by: "Jang, Bongseo" <graycells@gmail.com>
[yann.morin.1998@free.fr: fix the ports patches depth]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-ID: <5040c8e83e35618361dc.1348370890@localhost.localdomain>
PatchWork-ID: 186177
1.1 --- a/patches/eglibc/2_16/001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch Fri Sep 21 16:38:18 2012 +0200
1.2 +++ b/patches/eglibc/2_16/001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch Sun Sep 23 11:18:30 2012 +0900
1.3 @@ -17,10 +17,10 @@
1.4 7 files changed, 206 insertions(+), 21 deletions(-)
1.5 create mode 100644 elf/static-stubs.c
1.6
1.7 -Index: a/libc/Makeconfig
1.8 +Index: a/Makeconfig
1.9 ===================================================================
1.10 ---- a/libc/Makeconfig 2012-07-04 18:26:22.000000000 -0700
1.11 -+++ b/libc/Makeconfig 2012-08-14 20:16:10.197093639 -0700
1.12 +--- a/Makeconfig 2012-07-04 18:26:22.000000000 -0700
1.13 ++++ b/Makeconfig 2012-08-14 20:16:10.197093639 -0700
1.14 @@ -415,9 +415,9 @@
1.15 LDFLAGS-rtld += $(hashstyle-LDFLAGS)
1.16 endif
1.17 @@ -150,10 +150,10 @@
1.18 libc.so-gnulib := -lgcc
1.19 endif
1.20 +preinit = $(addprefix $(csu-objpfx),crti.o)
1.21 -Index: a/libc/Rules
1.22 +Index: a/Rules
1.23 ===================================================================
1.24 ---- a/libc/Rules 2012-07-04 18:25:47.000000000 -0700
1.25 -+++ b/libc/Rules 2012-08-14 20:16:10.197093639 -0700
1.26 +--- a/Rules 2012-07-04 18:25:47.000000000 -0700
1.27 ++++ b/Rules 2012-08-14 20:16:10.197093639 -0700
1.28 @@ -1,5 +1,4 @@
1.29 -# Copyright (C) 1991-2000,2002,2003,2004,2005,2006,2011
1.30 -# Free Software Foundation, Inc.
1.31 @@ -238,10 +238,10 @@
1.32 ifeq ($(build-bounded),yes)
1.33 binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
1.34 $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
1.35 -Index: a/libc/elf/Makefile
1.36 +Index: a/elf/Makefile
1.37 ===================================================================
1.38 ---- a/libc/elf/Makefile 2012-07-04 18:26:34.000000000 -0700
1.39 -+++ b/libc/elf/Makefile 2012-08-14 20:16:10.197093639 -0700
1.40 +--- a/elf/Makefile 2012-07-04 18:26:34.000000000 -0700
1.41 ++++ b/elf/Makefile 2012-08-14 20:16:10.197093639 -0700
1.42 @@ -71,6 +71,8 @@
1.43 install-bin = sprof pldd
1.44 others-static = sln
1.45 @@ -269,10 +269,10 @@
1.46 $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
1.47
1.48 $(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o)
1.49 -Index: a/libc/elf/static-stubs.c
1.50 +Index: a/elf/static-stubs.c
1.51 ===================================================================
1.52 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1.53 -+++ a/libc/elf/static-stubs.c 2012-08-14 20:16:10.197093639 -0700
1.54 ++++ a/elf/static-stubs.c 2012-08-14 20:16:10.197093639 -0700
1.55 @@ -0,0 +1,46 @@
1.56 +/* Stub implementations of functions to link into statically linked
1.57 + programs without needing libgcc_eh.
1.58 @@ -320,24 +320,3 @@
1.59 +{
1.60 + abort ();
1.61 +}
1.62 -Index: a/ports/sysdeps/arm/Makefile
1.63 -===================================================================
1.64 ---- a/ports/sysdeps/arm/Makefile 2012-07-04 18:25:41.000000000 -0700
1.65 -+++ b/ports/sysdeps/arm/Makefile 2012-08-14 20:16:10.201093638 -0700
1.66 -@@ -1,8 +1,16 @@
1.67 -+gnulib-arch = $(elfobjdir)/libgcc-stubs.a
1.68 -+static-gnulib-arch = $(elfobjdir)/libgcc-stubs.a
1.69 -+
1.70 - ifeq ($(subdir),elf)
1.71 - sysdep-dl-routines += tlsdesc dl-tlsdesc
1.72 - sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
1.73 - sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
1.74 - shared-only-routines += aeabi_unwind_cpp_pr1
1.75 -+
1.76 -+$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
1.77 -+ $(build-extra-lib)
1.78 -+
1.79 -+lib-noranlib: $(objpfx)libgcc-stubs.a
1.80 - endif
1.81 -
1.82 - ifeq ($(subdir),csu)
2.1 --- a/patches/eglibc/2_16/002-Add-ARM-specific-static-stubs.c.patch Fri Sep 21 16:38:18 2012 +0200
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,27 +0,0 @@
2.4 -Upstream-Status: Backport
2.5 -
2.6 -Signed-off-by: Khem Raj <raj.khem@gmail.com>
2.7 -
2.8 -From c57a67e03368687fc0d2ae8354cd1b347a61ea44 Mon Sep 17 00:00:00 2001
2.9 -From: Joseph Myers <joseph@codesourcery.com>
2.10 -Date: Thu, 5 Jul 2012 22:16:03 +0000
2.11 -Subject: [PATCH] Add ARM-specific static-stubs.c.
2.12 -
2.13 ----
2.14 - ports/ChangeLog.arm | 4 ++++
2.15 - ports/sysdeps/arm/static-stubs.c | 7 +++++++
2.16 - 2 files changed, 11 insertions(+)
2.17 - create mode 100644 ports/sysdeps/arm/static-stubs.c
2.18 -
2.19 -Index: a/ports/sysdeps/arm/static-stubs.c
2.20 -===================================================================
2.21 ---- /dev/null 1970-01-01 00:00:00.000000000 +0000
2.22 -+++ b/ports/sysdeps/arm/static-stubs.c 2012-08-15 15:04:59.687669241 -0700
2.23 -@@ -0,0 +1,7 @@
2.24 -+/* When building with GCC with static-only libgcc, the dummy
2.25 -+ _Unwind_Resume from static-stubs.c needs to be used together with
2.26 -+ the dummy __aeabi_unwind_cpp_pr* from aeabi_unwind_cpp_pr1.c
2.27 -+ instead of the copies from libgcc. */
2.28 -+
2.29 -+#include <elf/static-stubs.c>
2.30 -+#include <aeabi_unwind_cpp_pr1.c>
3.1 --- a/patches/eglibc/2_16/003-mips-rld-map-check.patch Fri Sep 21 16:38:18 2012 +0200
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,26 +0,0 @@
3.4 -
3.5 -On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
3.6 -section if a --version-script sets _RLD_MAP to local. This is apparently
3.7 -a binutils bug, but libc shouldn't segfault in this case.
3.8 -
3.9 -see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
3.10 -
3.11 -Upstream-Status: Pending
3.12 -
3.13 -9/19/2010 - added by Qing He <qing.he@intel.com>
3.14 -
3.15 -
3.16 ----
3.17 -diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
3.18 ---- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
3.19 -+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
3.20 -@@ -70,7 +70,8 @@
3.21 - /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
3.22 - with the run-time address of the r_debug structure */
3.23 - #define ELF_MACHINE_DEBUG_SETUP(l,r) \
3.24 --do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
3.25 -+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
3.26 -+ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
3.27 - *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
3.28 - (ElfW(Addr)) (r); \
3.29 - } while (0)
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/eglibc/ports-2_16/001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch Sun Sep 23 11:18:30 2012 +0900
4.3 @@ -0,0 +1,40 @@
4.4 +Upstream-Status: Backport
4.5 +Signed-off-by: Khem Raj <raj.khem@gmail.com>
4.6 +
4.7 +From 95f5a9a866695da4e038aa4e6ccbbfd5d9cf63b7 Mon Sep 17 00:00:00 2001
4.8 +From: Joseph Myers <joseph@codesourcery.com>
4.9 +Date: Tue, 3 Jul 2012 19:14:59 +0000
4.10 +Subject: [PATCH] Avoid use of libgcc_s and libgcc_eh when building glibc.
4.11 +
4.12 +---
4.13 + ChangeLog | 47 ++++++++++++++++++++++++++++++
4.14 + Makeconfig | 68 ++++++++++++++++++++++++++++++++++++++------
4.15 + Rules | 45 ++++++++++++++++++++++-------
4.16 + elf/Makefile | 6 +++-
4.17 + elf/static-stubs.c | 46 ++++++++++++++++++++++++++++++
4.18 + ports/ChangeLog.arm | 7 +++++
4.19 + ports/sysdeps/arm/Makefile | 8 ++++++
4.20 + 7 files changed, 206 insertions(+), 21 deletions(-)
4.21 + create mode 100644 elf/static-stubs.c
4.22 +
4.23 +-Index: a/ports/sysdeps/arm/Makefile
4.24 +===================================================================
4.25 +--- a/ports/sysdeps/arm/Makefile 2012-07-04 18:25:41.000000000 -0700
4.26 ++++ b/ports/sysdeps/arm/Makefile 2012-08-14 20:16:10.201093638 -0700
4.27 +@@ -1,8 +1,16 @@
4.28 ++gnulib-arch = $(elfobjdir)/libgcc-stubs.a
4.29 ++static-gnulib-arch = $(elfobjdir)/libgcc-stubs.a
4.30 ++
4.31 + ifeq ($(subdir),elf)
4.32 + sysdep-dl-routines += tlsdesc dl-tlsdesc
4.33 + sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
4.34 + sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
4.35 + shared-only-routines += aeabi_unwind_cpp_pr1
4.36 ++
4.37 ++$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
4.38 ++ $(build-extra-lib)
4.39 ++
4.40 ++lib-noranlib: $(objpfx)libgcc-stubs.a
4.41 + endif
4.42 +
4.43 + ifeq ($(subdir),csu)
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/eglibc/ports-2_16/002-Add-ARM-specific-static-stubs.c.patch Sun Sep 23 11:18:30 2012 +0900
5.3 @@ -0,0 +1,27 @@
5.4 +Upstream-Status: Backport
5.5 +
5.6 +Signed-off-by: Khem Raj <raj.khem@gmail.com>
5.7 +
5.8 +From c57a67e03368687fc0d2ae8354cd1b347a61ea44 Mon Sep 17 00:00:00 2001
5.9 +From: Joseph Myers <joseph@codesourcery.com>
5.10 +Date: Thu, 5 Jul 2012 22:16:03 +0000
5.11 +Subject: [PATCH] Add ARM-specific static-stubs.c.
5.12 +
5.13 +---
5.14 + ports/ChangeLog.arm | 4 ++++
5.15 + ports/sysdeps/arm/static-stubs.c | 7 +++++++
5.16 + 2 files changed, 11 insertions(+)
5.17 + create mode 100644 ports/sysdeps/arm/static-stubs.c
5.18 +
5.19 +Index: a/ports/sysdeps/arm/static-stubs.c
5.20 +===================================================================
5.21 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000
5.22 ++++ b/ports/sysdeps/arm/static-stubs.c 2012-08-15 15:04:59.687669241 -0700
5.23 +@@ -0,0 +1,7 @@
5.24 ++/* When building with GCC with static-only libgcc, the dummy
5.25 ++ _Unwind_Resume from static-stubs.c needs to be used together with
5.26 ++ the dummy __aeabi_unwind_cpp_pr* from aeabi_unwind_cpp_pr1.c
5.27 ++ instead of the copies from libgcc. */
5.28 ++
5.29 ++#include <elf/static-stubs.c>
5.30 ++#include <aeabi_unwind_cpp_pr1.c>
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/patches/eglibc/ports-2_16/003-mips-rld-map-check.patch Sun Sep 23 11:18:30 2012 +0900
6.3 @@ -0,0 +1,26 @@
6.4 +
6.5 +On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
6.6 +section if a --version-script sets _RLD_MAP to local. This is apparently
6.7 +a binutils bug, but libc shouldn't segfault in this case.
6.8 +
6.9 +see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
6.10 +
6.11 +Upstream-Status: Pending
6.12 +
6.13 +9/19/2010 - added by Qing He <qing.he@intel.com>
6.14 +
6.15 +
6.16 +---
6.17 +diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/sysdeps/mips/dl-machine.h
6.18 +--- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
6.19 ++++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
6.20 +@@ -70,7 +70,8 @@
6.21 + /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
6.22 + with the run-time address of the r_debug structure */
6.23 + #define ELF_MACHINE_DEBUG_SETUP(l,r) \
6.24 +-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
6.25 ++do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
6.26 ++ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
6.27 + *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
6.28 + (ElfW(Addr)) (r); \
6.29 + } while (0)