public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 2 of 3] patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch)
  2012-09-23  3:30 [PATCH 0 of 3] RESUBMIT: split eglibc patch, gdb-7.4.1 siginfo, custom kernel symlink graycells
  2012-09-23  3:30 ` [PATCH 1 of 3] patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches graycells
  2012-09-23  3:30 ` [PATCH 3 of 3] scripts/build/kernel: symlink custom kernel source dir with '-f' graycells
@ 2012-09-23  3:30 ` graycells
  2012-09-23 22:50   ` Yann E. MORIN
  2 siblings, 1 reply; 6+ messages in thread
From: graycells @ 2012-09-23  3:30 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Jang, Bongseo <graycells@gmail.com>
# Date 1348368782 -32400
# Node ID 4eef2edec3201c50b420a2ce04b73e29890dd553
# Parent  5040c8e83e35618361dc0f8470ff06abebab3e02
patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch)

This is for when you failed to build gdb-native with the error:

	gdb-7.4.1/gdb/linux-nat.h:79:18: error: field 'siginfo' has incomplete type"

This is from mirror://gentoo/distfiles/gdb-7.4.1-patches-2.tar.xz

Signed-off-by: "Jang, Bongseo" <graycells@gmail.com>

diff -r 5040c8e83e35 -r 4eef2edec320 patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch	Sun Sep 23 11:53:02 2012 +0900
@@ -0,0 +1,314 @@
+fix from upstream for building with newer kernel headers
+
+From a7f9ca9cb797d653dc7919538e1dfa0c26010331 Mon Sep 17 00:00:00 2001
+From: tschwinge <tschwinge>
+Date: Wed, 21 Mar 2012 13:43:50 +0000
+Subject: [PATCH] struct siginfo vs. siginfo_t
+
+gdb/
+	* amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead
+	of struct siginfo.
+	* arm-linux-nat.c (arm_linux_stopped_data_address): Likewise.
+	* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
+	* linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup)
+	(linux_xfer_siginfo, linux_nat_set_siginfo_fixup)
+	(linux_nat_get_siginfo): Likewise.
+	* linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup)
+	(linux_nat_get_siginfo): Likewise.
+	* linux-tdep.c (linux_get_siginfo_type): Likewise.
+	* ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise.
+	* procfs.c (gdb_siginfo_t): Likewise.
+
+gdbserver/
+	* linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
+	struct siginfo.
+	* linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
+	* linux-x86-low.c (x86_siginfo_fixup): Likewise.
+	* linux-low.h: Include <signal.h>.
+	(struct siginfo): Remove forward declaration.
+	(struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
+	struct siginfo.
+---
+ gdb/ChangeLog                 |   15 +++++++++++++++
+ gdb/amd64-linux-nat.c         |    4 ++--
+ gdb/arm-linux-nat.c           |    2 +-
+ gdb/gdbserver/ChangeLog       |   11 +++++++++++
+ gdb/gdbserver/linux-arm-low.c |    2 +-
+ gdb/gdbserver/linux-low.c     |   10 +++++-----
+ gdb/gdbserver/linux-low.h     |    5 ++---
+ gdb/gdbserver/linux-x86-low.c |    4 ++--
+ gdb/ia64-linux-nat.c          |    2 +-
+ gdb/linux-nat.c               |   16 ++++++++--------
+ gdb/linux-nat.h               |    6 +++---
+ gdb/ppc-linux-nat.c           |    2 +-
+ gdb/procfs.c                  |    2 +-
+ 13 files changed, 53 insertions(+), 28 deletions(-)
+
+diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
+index f954483..5ebba3a 100644
+--- a/gdb/amd64-linux-nat.c
++++ b/gdb/amd64-linux-nat.c
+@@ -731,13 +731,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
+    INF.  */
+ 
+ static int
+-amd64_linux_siginfo_fixup (struct siginfo *native, gdb_byte *inf, int direction)
++amd64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
+ {
+   /* Is the inferior 32-bit?  If so, then do fixup the siginfo
+      object.  */
+   if (gdbarch_addr_bit (get_frame_arch (get_current_frame ())) == 32)
+     {
+-      gdb_assert (sizeof (struct siginfo) == sizeof (compat_siginfo_t));
++      gdb_assert (sizeof (siginfo_t) == sizeof (compat_siginfo_t));
+ 
+       if (direction == 0)
+ 	compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, native);
+diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
+index c5ce21c..f9f6ba5 100644
+--- a/gdb/arm-linux-nat.c
++++ b/gdb/arm-linux-nat.c
+@@ -1137,7 +1137,7 @@ arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
+ static int
+ arm_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
+ {
+-  struct siginfo *siginfo_p = linux_nat_get_siginfo (inferior_ptid);
++  siginfo_t *siginfo_p = linux_nat_get_siginfo (inferior_ptid);
+   int slot = siginfo_p->si_errno;
+ 
+   /* This must be a hardware breakpoint.  */
+diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
+index ff2437d..01208ef 100644
+--- a/gdb/gdbserver/linux-arm-low.c
++++ b/gdb/gdbserver/linux-arm-low.c
+@@ -631,7 +631,7 @@ static int
+ arm_stopped_by_watchpoint (void)
+ {
+   struct lwp_info *lwp = get_thread_lwp (current_inferior);
+-  struct siginfo siginfo;
++  siginfo_t siginfo;
+ 
+   /* We must be able to set hardware watchpoints.  */
+   if (arm_linux_get_hw_watchpoint_count () == 0)
+diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
+index d2d4c1d..4734f15 100644
+--- a/gdb/gdbserver/linux-low.c
++++ b/gdb/gdbserver/linux-low.c
+@@ -4779,7 +4779,7 @@ linux_qxfer_osdata (const char *annex,
+    layout of the inferiors' architecture.  */
+ 
+ static void
+-siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction)
++siginfo_fixup (siginfo_t *siginfo, void *inf_siginfo, int direction)
+ {
+   int done = 0;
+ 
+@@ -4791,9 +4791,9 @@ siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction)
+   if (!done)
+     {
+       if (direction == 1)
+-	memcpy (siginfo, inf_siginfo, sizeof (struct siginfo));
++	memcpy (siginfo, inf_siginfo, sizeof (siginfo_t));
+       else
+-	memcpy (inf_siginfo, siginfo, sizeof (struct siginfo));
++	memcpy (inf_siginfo, siginfo, sizeof (siginfo_t));
+     }
+ }
+ 
+@@ -4802,8 +4802,8 @@ linux_xfer_siginfo (const char *annex, unsigned char *readbuf,
+ 		    unsigned const char *writebuf, CORE_ADDR offset, int len)
+ {
+   int pid;
+-  struct siginfo siginfo;
+-  char inf_siginfo[sizeof (struct siginfo)];
++  siginfo_t siginfo;
++  char inf_siginfo[sizeof (siginfo_t)];
+ 
+   if (current_inferior == NULL)
+     return -1;
+diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
+index 677d261..3aeae70 100644
+--- a/gdb/gdbserver/linux-low.h
++++ b/gdb/gdbserver/linux-low.h
+@@ -20,6 +20,7 @@
+ #ifdef HAVE_THREAD_DB_H
+ #include <thread_db.h>
+ #endif
++#include <signal.h>
+ 
+ #include "gdb_proc_service.h"
+ 
+@@ -46,8 +47,6 @@ struct regset_info
+ extern struct regset_info target_regsets[];
+ #endif
+ 
+-struct siginfo;
+-
+ struct process_info_private
+ {
+   /* Arch-specific additions.  */
+@@ -109,7 +108,7 @@ struct linux_target_ops
+      Returns true if any conversion was done; false otherwise.
+      If DIRECTION is 1, then copy from INF to NATIVE.
+      If DIRECTION is 0, copy from NATIVE to INF.  */
+-  int (*siginfo_fixup) (struct siginfo *native, void *inf, int direction);
++  int (*siginfo_fixup) (siginfo_t *native, void *inf, int direction);
+ 
+   /* Hook to call when a new process is created or attached to.
+      If extra per-process architecture-specific data is needed,
+diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
+index ed1f8a8..b466b5d 100644
+--- a/gdb/gdbserver/linux-x86-low.c
++++ b/gdb/gdbserver/linux-x86-low.c
+@@ -918,13 +918,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
+    INF.  */
+ 
+ static int
+-x86_siginfo_fixup (struct siginfo *native, void *inf, int direction)
++x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
+ {
+ #ifdef __x86_64__
+   /* Is the inferior 32-bit?  If so, then fixup the siginfo object.  */
+   if (register_size (0) == 4)
+     {
+-      if (sizeof (struct siginfo) != sizeof (compat_siginfo_t))
++      if (sizeof (siginfo_t) != sizeof (compat_siginfo_t))
+ 	fatal ("unexpected difference in siginfo");
+ 
+       if (direction == 0)
+diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
+index 8773195..19b827f 100644
+--- a/gdb/ia64-linux-nat.c
++++ b/gdb/ia64-linux-nat.c
+@@ -637,7 +637,7 @@ static int
+ ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
+ {
+   CORE_ADDR psr;
+-  struct siginfo *siginfo_p;
++  siginfo_t *siginfo_p;
+   struct regcache *regcache = get_current_regcache ();
+ 
+   siginfo_p = linux_nat_get_siginfo (inferior_ptid);
+diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
+index f80c0c1..d81d55e 100644
+--- a/gdb/linux-nat.c
++++ b/gdb/linux-nat.c
+@@ -188,7 +188,7 @@ static void (*linux_nat_prepare_to_resume) (struct lwp_info *);
+ /* The method to call, if any, when the siginfo object needs to be
+    converted between the layout returned by ptrace, and the layout in
+    the architecture of the inferior.  */
+-static int (*linux_nat_siginfo_fixup) (struct siginfo *,
++static int (*linux_nat_siginfo_fixup) (siginfo_t *,
+ 				       gdb_byte *,
+ 				       int);
+ 
+@@ -4232,7 +4232,7 @@ linux_nat_mourn_inferior (struct target_ops *ops)
+    layout of the inferiors' architecture.  */
+ 
+ static void
+-siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction)
++siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
+ {
+   int done = 0;
+ 
+@@ -4244,9 +4244,9 @@ siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction)
+   if (!done)
+     {
+       if (direction == 1)
+-	memcpy (siginfo, inf_siginfo, sizeof (struct siginfo));
++	memcpy (siginfo, inf_siginfo, sizeof (siginfo_t));
+       else
+-	memcpy (inf_siginfo, siginfo, sizeof (struct siginfo));
++	memcpy (inf_siginfo, siginfo, sizeof (siginfo_t));
+     }
+ }
+ 
+@@ -4256,8 +4256,8 @@ linux_xfer_siginfo (struct target_ops *ops, enum target_object object,
+ 		    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+ {
+   int pid;
+-  struct siginfo siginfo;
+-  gdb_byte inf_siginfo[sizeof (struct siginfo)];
++  siginfo_t siginfo;
++  gdb_byte inf_siginfo[sizeof (siginfo_t)];
+ 
+   gdb_assert (object == TARGET_OBJECT_SIGNAL_INFO);
+   gdb_assert (readbuf || writebuf);
+@@ -5266,7 +5266,7 @@ linux_nat_set_new_thread (struct target_ops *t,
+    inferior.  */
+ void
+ linux_nat_set_siginfo_fixup (struct target_ops *t,
+-			     int (*siginfo_fixup) (struct siginfo *,
++			     int (*siginfo_fixup) (siginfo_t *,
+ 						   gdb_byte *,
+ 						   int))
+ {
+@@ -5285,7 +5285,7 @@ linux_nat_set_prepare_to_resume (struct target_ops *t,
+ }
+ 
+ /* Return the saved siginfo associated with PTID.  */
+-struct siginfo *
++siginfo_t *
+ linux_nat_get_siginfo (ptid_t ptid)
+ {
+   struct lwp_info *lp = find_lwp_pid (ptid);
+diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h
+index c9878d9..d87f0cf 100644
+--- a/gdb/linux-nat.h
++++ b/gdb/linux-nat.h
+@@ -78,7 +78,7 @@ struct lwp_info
+ 
+   /* Non-zero si_signo if this LWP stopped with a trap.  si_addr may
+      be the address of a hardware watchpoint.  */
+-  struct siginfo siginfo;
++  siginfo_t siginfo;
+ 
+   /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
+      watchpoint trap.  */
+@@ -184,7 +184,7 @@ void linux_nat_set_new_thread (struct target_ops *, void (*) (struct lwp_info *)
+    that ptrace returns, and the layout in the architecture of the
+    inferior.  */
+ void linux_nat_set_siginfo_fixup (struct target_ops *,
+-				  int (*) (struct siginfo *,
++				  int (*) (siginfo_t *,
+ 					   gdb_byte *,
+ 					   int));
+ 
+@@ -198,7 +198,7 @@ void linux_nat_set_prepare_to_resume (struct target_ops *,
+ void linux_nat_switch_fork (ptid_t new_ptid);
+ 
+ /* Return the saved siginfo associated with PTID.  */
+-struct siginfo *linux_nat_get_siginfo (ptid_t ptid);
++siginfo_t *linux_nat_get_siginfo (ptid_t ptid);
+ 
+ /* Set alternative SIGTRAP-like events recognizer.  */
+ void linux_nat_set_status_is_event (struct target_ops *t,
+diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
+index 1bd157b..9bd11fd 100644
+--- a/gdb/ppc-linux-nat.c
++++ b/gdb/ppc-linux-nat.c
+@@ -2218,7 +2218,7 @@ ppc_linux_thread_exit (struct thread_info *tp, int silent)
+ static int
+ ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
+ {
+-  struct siginfo *siginfo_p;
++  siginfo_t *siginfo_p;
+ 
+   siginfo_p = linux_nat_get_siginfo (inferior_ptid);
+ 
+diff --git a/gdb/procfs.c b/gdb/procfs.c
+index 903621d..cb4bc7c 100644
+--- a/gdb/procfs.c
++++ b/gdb/procfs.c
+@@ -266,7 +266,7 @@ typedef struct sigaction gdb_sigaction_t;
+ #ifdef HAVE_PR_SIGINFO64_T
+ typedef pr_siginfo64_t gdb_siginfo_t;
+ #else
+-typedef struct siginfo gdb_siginfo_t;
++typedef siginfo_t gdb_siginfo_t;
+ #endif
+ 
+ /* On mips-irix, praddset and prdelset are defined in such a way that
+-- 
+1.7.9.7
+
diff -r 5040c8e83e35 -r 4eef2edec320 patches/gdb/7.4.1/05_all_readline-headers.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gdb/7.4.1/05_all_readline-headers.patch	Sun Sep 23 11:53:02 2012 +0900
@@ -0,0 +1,42 @@
+--- a/readline/complete.c
++++ b/readline/complete.c
+@@ -25,6 +25,11 @@
+ #  include <config.h>
+ #endif
+ 
++#ifdef HAVE_WCHAR_H /* wcwidth() */
++# define _GNU_SOURCE
++# include <wchar.h>
++#endif
++
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #if defined (HAVE_SYS_FILE_H)
+--- a/readline/display.c
++++ b/readline/display.c
+@@ -25,6 +25,11 @@
+ #  include <config.h>
+ #endif
+ 
++#ifdef HAVE_WCHAR_H /* wcwidth() */
++# define _GNU_SOURCE
++# include <wchar.h>
++#endif
++
+ #include <sys/types.h>
+ 
+ #if defined (HAVE_UNISTD_H)
+--- a/readline/mbutil.c
++++ b/readline/mbutil.c
+@@ -25,6 +25,11 @@
+ #  include <config.h>
+ #endif
+ 
++#ifdef HAVE_WCHAR_H /* wcwidth() */
++# define _GNU_SOURCE
++# include <wchar.h>
++#endif
++
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include "posixjmp.h"

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0 of 3] RESUBMIT: split eglibc patch, gdb-7.4.1 siginfo, custom kernel symlink
@ 2012-09-23  3:30 graycells
  2012-09-23  3:30 ` [PATCH 1 of 3] patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches graycells
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: graycells @ 2012-09-23  3:30 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Yann, Florian, All,

I resubmit my last patches following the guide, doc/C - Misc. tutorials.txt
(Last patches doesn't work, my ignorance of hg learns a lot, thanks Yann)

1/3: make latest eglibc patch work with crosstool-ng
2/3: 'compiling gdb' against newer glibc fails with incomplete 'siginfo' error
3/3: symlinking custom kernel dir with 'ln -sf'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3 of 3] scripts/build/kernel: symlink custom kernel source dir with '-f'
  2012-09-23  3:30 [PATCH 0 of 3] RESUBMIT: split eglibc patch, gdb-7.4.1 siginfo, custom kernel symlink graycells
  2012-09-23  3:30 ` [PATCH 1 of 3] patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches graycells
@ 2012-09-23  3:30 ` graycells
  2012-09-23  3:30 ` [PATCH 2 of 3] patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch) graycells
  2 siblings, 0 replies; 6+ messages in thread
From: graycells @ 2012-09-23  3:30 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Jang, Bongseo <graycells@gmail.com>
# Date 1348369168 -32400
# Node ID 543e2981f2b723ecd850cf2f839a1a7ccdf571b3
# Parent  4eef2edec3201c50b420a2ce04b73e29890dd553
scripts/build/kernel: symlink custom kernel source dir with '-f'

build fails to symlink to custom kernel dir when the build is not the first time
because of 'ln -s' without '-f' option.

Signed-off-by: "Jang, Bongseo" <graycells@gmail.com>

diff -r 4eef2edec320 -r 543e2981f2b7 scripts/build/kernel/linux.sh
--- a/scripts/build/kernel/linux.sh	Sun Sep 23 11:53:02 2012 +0900
+++ b/scripts/build/kernel/linux.sh	Sun Sep 23 11:59:28 2012 +0900
@@ -41,7 +41,7 @@
                                       "${CT_TARBALLS_DIR}/${custom_name}"
         else
             custom_name="linux-custom"
-            CT_DoExecLog DEBUG ln -s "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"  \
+            CT_DoExecLog DEBUG ln -sf "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"  \
                                       "${CT_SRC_DIR}/${custom_name}"
         fi
     else # Not a custom tarball

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1 of 3] patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches
  2012-09-23  3:30 [PATCH 0 of 3] RESUBMIT: split eglibc patch, gdb-7.4.1 siginfo, custom kernel symlink graycells
@ 2012-09-23  3:30 ` graycells
  2012-09-23 22:49   ` Yann E. MORIN
  2012-09-23  3:30 ` [PATCH 3 of 3] scripts/build/kernel: symlink custom kernel source dir with '-f' graycells
  2012-09-23  3:30 ` [PATCH 2 of 3] patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch) graycells
  2 siblings, 1 reply; 6+ messages in thread
From: graycells @ 2012-09-23  3:30 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Jang, Bongseo <graycells@gmail.com>
# Date 1348366710 -32400
# Node ID 5040c8e83e35618361dc0f8470ff06abebab3e02
# Parent  b60b008ab49cc1b8623ba2623fb0467ef479b7a4
patches/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>

diff -r b60b008ab49c -r 5040c8e83e35 patches/eglibc/2_16/001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch
--- 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
+++ 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
@@ -17,10 +17,10 @@
  7 files changed, 206 insertions(+), 21 deletions(-)
  create mode 100644 elf/static-stubs.c
 
-Index: a/libc/Makeconfig
+Index: a/Makeconfig
 ===================================================================
---- a/libc/Makeconfig	2012-07-04 18:26:22.000000000 -0700
-+++ b/libc/Makeconfig	2012-08-14 20:16:10.197093639 -0700
+--- a/Makeconfig	2012-07-04 18:26:22.000000000 -0700
++++ b/Makeconfig	2012-08-14 20:16:10.197093639 -0700
 @@ -415,9 +415,9 @@
  LDFLAGS-rtld += $(hashstyle-LDFLAGS)
  endif
@@ -150,10 +150,10 @@
  libc.so-gnulib := -lgcc
  endif
  +preinit = $(addprefix $(csu-objpfx),crti.o)
-Index: a/libc/Rules
+Index: a/Rules
 ===================================================================
---- a/libc/Rules	2012-07-04 18:25:47.000000000 -0700
-+++ b/libc/Rules	2012-08-14 20:16:10.197093639 -0700
+--- a/Rules	2012-07-04 18:25:47.000000000 -0700
++++ b/Rules	2012-08-14 20:16:10.197093639 -0700
 @@ -1,5 +1,4 @@
 -# Copyright (C) 1991-2000,2002,2003,2004,2005,2006,2011
 -#	Free Software Foundation, Inc.
@@ -238,10 +238,10 @@
  ifeq ($(build-bounded),yes)
  binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
  $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
-Index: a/libc/elf/Makefile
+Index: a/elf/Makefile
 ===================================================================
---- a/libc/elf/Makefile	2012-07-04 18:26:34.000000000 -0700
-+++ b/libc/elf/Makefile	2012-08-14 20:16:10.197093639 -0700
+--- a/elf/Makefile	2012-07-04 18:26:34.000000000 -0700
++++ b/elf/Makefile	2012-08-14 20:16:10.197093639 -0700
 @@ -71,6 +71,8 @@
  install-bin	= sprof pldd
  others-static   = sln
@@ -269,10 +269,10 @@
  $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
  
  $(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o)
-Index: a/libc/elf/static-stubs.c
+Index: a/elf/static-stubs.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ a/libc/elf/static-stubs.c	2012-08-14 20:16:10.197093639 -0700
++++ a/elf/static-stubs.c	2012-08-14 20:16:10.197093639 -0700
 @@ -0,0 +1,46 @@
 +/* Stub implementations of functions to link into statically linked
 +   programs without needing libgcc_eh.
@@ -320,24 +320,3 @@
 +{
 +  abort ();
 +}
-Index: a/ports/sysdeps/arm/Makefile
-===================================================================
---- a/ports/sysdeps/arm/Makefile	2012-07-04 18:25:41.000000000 -0700
-+++ b/ports/sysdeps/arm/Makefile	2012-08-14 20:16:10.201093638 -0700
-@@ -1,8 +1,16 @@
-+gnulib-arch = $(elfobjdir)/libgcc-stubs.a
-+static-gnulib-arch = $(elfobjdir)/libgcc-stubs.a
-+
- ifeq ($(subdir),elf)
- sysdep-dl-routines += tlsdesc dl-tlsdesc
- sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
- sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
- shared-only-routines += aeabi_unwind_cpp_pr1
-+
-+$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
-+	$(build-extra-lib)
-+
-+lib-noranlib: $(objpfx)libgcc-stubs.a
- endif
- 
- ifeq ($(subdir),csu)
diff -r b60b008ab49c -r 5040c8e83e35 patches/eglibc/2_16/002-Add-ARM-specific-static-stubs.c.patch
--- a/patches/eglibc/2_16/002-Add-ARM-specific-static-stubs.c.patch	Fri Sep 21 16:38:18 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-From c57a67e03368687fc0d2ae8354cd1b347a61ea44 Mon Sep 17 00:00:00 2001
-From: Joseph Myers <joseph@codesourcery.com>
-Date: Thu, 5 Jul 2012 22:16:03 +0000
-Subject: [PATCH] Add ARM-specific static-stubs.c.
-
----
- ports/ChangeLog.arm              |    4 ++++
- ports/sysdeps/arm/static-stubs.c |    7 +++++++
- 2 files changed, 11 insertions(+)
- create mode 100644 ports/sysdeps/arm/static-stubs.c
-
-Index: a/ports/sysdeps/arm/static-stubs.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ b/ports/sysdeps/arm/static-stubs.c	2012-08-15 15:04:59.687669241 -0700
-@@ -0,0 +1,7 @@
-+/* When building with GCC with static-only libgcc, the dummy
-+   _Unwind_Resume from static-stubs.c needs to be used together with
-+   the dummy __aeabi_unwind_cpp_pr* from aeabi_unwind_cpp_pr1.c
-+   instead of the copies from libgcc.  */
-+
-+#include <elf/static-stubs.c>
-+#include <aeabi_unwind_cpp_pr1.c>
diff -r b60b008ab49c -r 5040c8e83e35 patches/eglibc/2_16/003-mips-rld-map-check.patch
--- a/patches/eglibc/2_16/003-mips-rld-map-check.patch	Fri Sep 21 16:38:18 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-
-On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
-section if a --version-script sets _RLD_MAP to local. This is apparently
-a binutils bug, but libc shouldn't segfault in this case.
-
-see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
-
-Upstream-Status: Pending
-
-9/19/2010 - added by Qing He <qing.he@intel.com>
-
-
----
-diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
---- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h	2009-05-16 16:36:20.000000000 +0800
-+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h	2010-09-19 09:11:53.000000000 +0800
-@@ -70,7 +70,8 @@
- /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
-    with the run-time address of the r_debug structure  */
- #define ELF_MACHINE_DEBUG_SETUP(l,r) \
--do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
-+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
-+         (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
-        *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
-        (ElfW(Addr)) (r); \
-    } while (0)
diff -r b60b008ab49c -r 5040c8e83e35 patches/eglibc/ports-2_16/001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ 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
@@ -0,0 +1,40 @@
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From 95f5a9a866695da4e038aa4e6ccbbfd5d9cf63b7 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 3 Jul 2012 19:14:59 +0000
+Subject: [PATCH] Avoid use of libgcc_s and libgcc_eh when building glibc.
+
+---
+ ChangeLog                  |   47 ++++++++++++++++++++++++++++++
+ Makeconfig                 |   68 ++++++++++++++++++++++++++++++++++++++------
+ Rules                      |   45 ++++++++++++++++++++++-------
+ elf/Makefile               |    6 +++-
+ elf/static-stubs.c         |   46 ++++++++++++++++++++++++++++++
+ ports/ChangeLog.arm        |    7 +++++
+ ports/sysdeps/arm/Makefile |    8 ++++++
+ 7 files changed, 206 insertions(+), 21 deletions(-)
+ create mode 100644 elf/static-stubs.c
+
+-Index: a/sysdeps/arm/Makefile
+===================================================================
+--- a/sysdeps/arm/Makefile       2012-07-04 18:25:41.000000000 -0700
++++ b/sysdeps/arm/Makefile       2012-08-14 20:16:10.201093638 -0700
+@@ -1,8 +1,16 @@
++gnulib-arch = $(elfobjdir)/libgcc-stubs.a
++static-gnulib-arch = $(elfobjdir)/libgcc-stubs.a
++
+ ifeq ($(subdir),elf)
+ sysdep-dl-routines += tlsdesc dl-tlsdesc
+ sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
+ sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
+ shared-only-routines += aeabi_unwind_cpp_pr1
++
++$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
++	$(build-extra-lib)
++
++lib-noranlib: $(objpfx)libgcc-stubs.a
+ endif
+
+ ifeq ($(subdir),csu)
diff -r b60b008ab49c -r 5040c8e83e35 patches/eglibc/ports-2_16/002-Add-ARM-specific-static-stubs.c.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/eglibc/ports-2_16/002-Add-ARM-specific-static-stubs.c.patch	Sun Sep 23 11:18:30 2012 +0900
@@ -0,0 +1,27 @@
+Upstream-Status: Backport
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From c57a67e03368687fc0d2ae8354cd1b347a61ea44 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Thu, 5 Jul 2012 22:16:03 +0000
+Subject: [PATCH] Add ARM-specific static-stubs.c.
+
+---
+ ports/ChangeLog.arm              |    4 ++++
+ ports/sysdeps/arm/static-stubs.c |    7 +++++++
+ 2 files changed, 11 insertions(+)
+ create mode 100644 ports/sysdeps/arm/static-stubs.c
+
+Index: a/sysdeps/arm/static-stubs.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ b/sysdeps/arm/static-stubs.c	2012-08-15 15:04:59.687669241 -0700
+@@ -0,0 +1,7 @@
++/* When building with GCC with static-only libgcc, the dummy
++   _Unwind_Resume from static-stubs.c needs to be used together with
++   the dummy __aeabi_unwind_cpp_pr* from aeabi_unwind_cpp_pr1.c
++   instead of the copies from libgcc.  */
++
++#include <elf/static-stubs.c>
++#include <aeabi_unwind_cpp_pr1.c>
diff -r b60b008ab49c -r 5040c8e83e35 patches/eglibc/ports-2_16/003-mips-rld-map-check.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/eglibc/ports-2_16/003-mips-rld-map-check.patch	Sun Sep 23 11:18:30 2012 +0900
@@ -0,0 +1,26 @@
+
+On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
+section if a --version-script sets _RLD_MAP to local. This is apparently
+a binutils bug, but libc shouldn't segfault in this case.
+
+see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
+
+Upstream-Status: Pending
+
+9/19/2010 - added by Qing He <qing.he@intel.com>
+
+
+---
+diff -ru glibc-2.10.1.orig/sysdeps/mips/dl-machine.h glibc-2.10.1/sysdeps/mips/dl-machine.h
+--- glibc-2.10.1.orig/sysdeps/mips/dl-machine.h	2009-05-16 16:36:20.000000000 +0800
++++ glibc-2.10.1/sysdeps/mips/dl-machine.h	2010-09-19 09:11:53.000000000 +0800
+@@ -70,7 +70,8 @@
+ /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
+    with the run-time address of the r_debug structure  */
+ #define ELF_MACHINE_DEBUG_SETUP(l,r) \
+-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
++do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
++         (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
+        *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
+        (ElfW(Addr)) (r); \
+    } while (0)

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1 of 3] patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches
  2012-09-23  3:30 ` [PATCH 1 of 3] patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches graycells
@ 2012-09-23 22:49   ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2012-09-23 22:49 UTC (permalink / raw)
  To: crossgcc; +Cc: graycells

Bongseo, All,

On Sunday 23 September 2012 05:28:10 graycells@gmail.com wrote:
> # HG changeset patch
> # User Jang, Bongseo <graycells@gmail.com>
> # Date 1348366710 -32400
> # Node ID 5040c8e83e35618361dc0f8470ff06abebab3e02
> # Parent  b60b008ab49cc1b8623ba2623fb0467ef479b7a4
> patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches

Applied (after fixing the ports' patches depth) as #2800ef0ff450. Thank you!

Regards,
Yann E. MORIN.

PS. Sorry for the double mails, my automatic script was borked... :-(

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2 of 3] patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch)
  2012-09-23  3:30 ` [PATCH 2 of 3] patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch) graycells
@ 2012-09-23 22:50   ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2012-09-23 22:50 UTC (permalink / raw)
  To: crossgcc; +Cc: graycells

Bongseo, All,

On Sunday 23 September 2012 05:28:11 graycells@gmail.com wrote:
> # HG changeset patch
> # User Jang, Bongseo <graycells@gmail.com>
> # Date 1348368782 -32400
> # Node ID 4eef2edec3201c50b420a2ce04b73e29890dd553
> # Parent  5040c8e83e35618361dc0f8470ff06abebab3e02
> patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch)

Applied (with one depth-fix) as #1e5fe55974bc. Thank you!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-23 22:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-23  3:30 [PATCH 0 of 3] RESUBMIT: split eglibc patch, gdb-7.4.1 siginfo, custom kernel symlink graycells
2012-09-23  3:30 ` [PATCH 1 of 3] patches/eglibc: Split changeset 3052:06b663f297 into eglibc/libc and eglibc/ports patches graycells
2012-09-23 22:49   ` Yann E. MORIN
2012-09-23  3:30 ` [PATCH 3 of 3] scripts/build/kernel: symlink custom kernel source dir with '-f' graycells
2012-09-23  3:30 ` [PATCH 2 of 3] patches/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch) graycells
2012-09-23 22:50   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).