From 8c0034fba27022d0d5e1b3f6c7cd7d7ff66ea889 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 16 May 2009 04:10:34 +0200 Subject: [PATCH] glibc: add a patch from redhat to make gdb work with threaded apps. Bump revision. --HG-- extra : convert_revision : e187f5de60b3bbef5d930c461420ce0ab6d18e61 --- templates/glibc/template | 3 ++- templates/glibc/thread_db.diff | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 templates/glibc/thread_db.diff diff --git a/templates/glibc/template b/templates/glibc/template index cdf34690d3b..3b923385d14 100644 --- a/templates/glibc/template +++ b/templates/glibc/template @@ -2,7 +2,8 @@ pkgname=glibc sourcepkg=glibc version=2.9 -patch_files="xattr.h-dupdefs.diff" +revision=1 +patch_files="xattr.h-dupdefs.diff thread_db.diff" # Uncomment these lines to use a snapshot from Redhat. #glibc_snapdate=20090209 #wrksrc="$pkgname-$version-$glibc_snapdate" diff --git a/templates/glibc/thread_db.diff b/templates/glibc/thread_db.diff new file mode 100644 index 00000000000..02df68d760b --- /dev/null +++ b/templates/glibc/thread_db.diff @@ -0,0 +1,47 @@ +2009-02-27 Roland McGrath + + * init.c (__nptl_initial_report_events): Mark __attribute_used__. + * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise. + +Index: nptl/init.c +=================================================================== +RCS file: /cvs/glibc/libc/nptl/init.c,v +retrieving revision 1.78 +diff -u -r1.78 init.c +--- nptl/init.c 29 Jan 2009 20:35:17 -0000 1.78 ++++ nptl/init.c 28 Feb 2009 02:26:34 -0000 +@@ -260,7 +260,7 @@ + + + /* This can be set by the debugger before initialization is complete. */ +-static bool __nptl_initial_report_events; ++static bool __nptl_initial_report_events __attribute_used__; + + void + __pthread_initialize_minimal_internal (void) +Index: nptl/pthread_create.c +=================================================================== +RCS file: /cvs/glibc/libc/nptl/pthread_create.c,v +retrieving revision 1.59 +diff -u -r1.59 pthread_create.c +--- nptl/pthread_create.c 9 Apr 2008 17:58:06 -0000 1.59 ++++ nptl/pthread_create.c 28 Feb 2009 02:26:34 -0000 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc. ++/* Copyright (C) 2002-2007,2008,2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2002. + +@@ -40,10 +40,10 @@ + int __pthread_debug; + + /* Globally enabled events. */ +-static td_thr_events_t __nptl_threads_events; ++static td_thr_events_t __nptl_threads_events __attribute_used__; + + /* Pointer to descriptor with the last event. */ +-static struct pthread *__nptl_last_event; ++static struct pthread *__nptl_last_event __attribute_used__; + + /* Number of threads running. */ + unsigned int __nptl_nthreads = 1;