This file is indexed.

/usr/src/gcc-4.4/debian/patches/hurd-pthread.diff is in gcc-4.4-source 4.4.7-8ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Fix pthread support in a/src/boehm-gc

--- a/src/boehm-gc/pthread_support.c.orig	2009-02-07 22:27:11.828527000 +0000
+++ b/src/boehm-gc/pthread_support.c	2009-02-07 22:27:18.279505000 +0000
@@ -885,7 +885,7 @@
 	  GC_nprocs = pthread_num_processors_np();
 #       endif
 #	if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) \
-	   || defined(GC_SOLARIS_PTHREADS)
+	   || defined(GC_SOLARIS_PTHREADS) || defined(GC_GNU_THREADS)
 	  GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
 	  if (GC_nprocs <= 0) GC_nprocs = 1;
 #	endif
--- a/src/boehm-gc/include/gc_config_macros.h.orig	2009-02-07 22:25:08.240177000 +0000
+++ b/src/boehm-gc/include/gc_config_macros.h	2009-02-07 22:28:40.648347000 +0000
@@ -6,7 +6,8 @@
 		             || defined(GC_SOLARIS_PTHREADS) \
 			     || defined(GC_HPUX_THREADS) \
 			     || defined(GC_AIX_THREADS) \
-			     || defined(GC_LINUX_THREADS))
+			     || defined(GC_LINUX_THREADS) \
+			     || defined(GC_GNU_THREADS))
 # define _REENTRANT
 	/* Better late than never.  This fails if system headers that	*/
 	/* depend on this were previously included.			*/
@@ -21,7 +22,8 @@
 	defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
 	defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
 	defined(GC_AIX_THREADS) || \
-        (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
+        (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) || \
+	defined(GC_GNU_THREADS)
 #   define GC_PTHREADS
 # endif
 
--- a/src/boehm-gc/threadlibs.c.orig	2009-02-07 22:34:42.429201000 +0000
+++ b/src/boehm-gc/threadlibs.c	2009-02-07 22:34:49.530544000 +0000
@@ -12,7 +12,8 @@
 #   endif
 #   if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
 	|| defined(GC_SOLARIS_PTHREADS) \
-	|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
+	|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
+	|| defined(GC_GNU_THREADS)
         printf("-lpthread\n");
 #   endif
 #   if defined(GC_FREEBSD_THREADS)
--- a/src/boehm-gc/configure.ac.orig	2009-02-07 22:30:12.000000000 +0000
+++ b/src/boehm-gc/configure.ac	2009-02-07 22:35:31.717091000 +0000
@@ -172,6 +172,11 @@
 	AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
 	THREADLIBS=-pthread
       	;;
+     *-*-gnu*)
+	AC_DEFINE(GC_GNU_THREADS,1,[support GNU threads])
+	AC_DEFINE(_REENTRANT)
+	AC_DEFINE(THREAD_LOCAL_ALLOC)
+      	;;
      *-*-solaris*)
 	AC_DEFINE(GC_SOLARIS_PTHREADS,1,[support for Solaris pthreads])
 	# Need to use alternate thread library, otherwise gctest hangs
--- a/src/boehm-gc/configure.orig	2009-02-07 22:32:34.000000000 +0000
+++ b/src/boehm-gc/configure	2009-02-07 22:35:28.065650000 +0000
@@ -5489,6 +5489,20 @@
 	AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
 	THREADLIBS=-pthread
       	;;
+     *-*-gnu*)
+cat >>confdefs.h <<\_ACEOF
+#define GC_GNU_THREADS 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define THREAD_LOCAL_ALLOC 1
+_ACEOF
+
+      	;;
      *-*-solaris*)
 
 cat >>confdefs.h <<\_ACEOF
--- a/src/boehm-gc/os_dep.c.orig	2009-02-07 22:37:20.000000000 +0000
+++ b/src/boehm-gc/os_dep.c	2009-02-07 22:37:40.000000000 +0000
@@ -312,7 +312,7 @@
   /* for recent Linux versions.  This seems to be the easiest way to	*/
   /* cover all versions.						*/
 
-# ifdef LINUX
+# if defined(LINUX) || defined(HURD)
     /* Some Linux distributions arrange to define __data_start.  Some	*/
     /* define data_start as a weak symbol.  The latter is technically	*/
     /* broken, since the user program may define data_start, in which	*/
@@ -331,7 +331,7 @@
   {
     extern ptr_t GC_find_limit();
 
-#   ifdef LINUX
+#   if defined(LINUX) || defined(HURD)
       /* Try the easy approaches first:	*/
       if ((ptr_t)__data_start != 0) {
 	  GC_data_start = (ptr_t)(__data_start);
--- a/src/boehm-gc/include/private/gcconfig.h.orig	2009-02-07 22:29:18.000000000 +0000
+++ b/src/boehm-gc/include/private/gcconfig.h	2009-02-07 22:41:24.598684000 +0000
@@ -1316,8 +1316,9 @@
 #     define OS_TYPE "HURD"
 #     define STACK_GROWS_DOWN
 #     define HEURISTIC2
-      extern int  __data_start[];
-#     define DATASTART ( (ptr_t) (__data_start))
+#     define SIG_SUSPEND SIGUSR1
+#     define SIG_THR_RESTART SIGUSR2
+#     define SEARCH_FOR_DATA_START
       extern int   _end[];
 #     define DATAEND ( (ptr_t) (_end))
 /* #     define MPROTECT_VDB  Not quite working yet? */
@@ -2153,7 +2154,8 @@
 # if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
 	    || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
 	    || defined(DGUX) || defined(BSD) || defined(SUNOS4) \
-	    || defined(_AIX) || defined(DARWIN) || defined(OSF1)
+	    || defined(_AIX) || defined(DARWIN) || defined(OSF1) \
+	    || defined(HURD)
 #   define UNIX_LIKE   /* Basic Unix-like system calls work.	*/
 # endif
 
@@ -2209,7 +2211,7 @@
 #   define CACHE_LINE_SIZE 32	/* Wild guess	*/
 # endif
 
-# if defined(LINUX) || defined(__GLIBC__)
+# if defined(LINUX) || defined(HURD) || defined(__GLIBC__)
 #   define REGISTER_LIBRARIES_EARLY
     /* We sometimes use dl_iterate_phdr, which may acquire an internal	*/
     /* lock.  This isn't safe after the world has stopped.  So we must	*/
@@ -2244,6 +2246,9 @@
 # if defined(GC_AIX_THREADS) && !defined(_AIX)
 	--> inconsistent configuration
 # endif
+# if defined(GC_GNU_THREADS) && !defined(HURD)
+	--> inconsistent configuration
+# endif
 # if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32)
 	--> inconsistent configuration
 # endif
--- a/src/boehm-gc/include/gc_config.h.in.orig	2009-02-08 01:51:09.707191000 +0000
+++ b/src/boehm-gc/include/gc_config.h.in	2009-02-08 01:54:06.298757000 +0000
@@ -33,6 +33,9 @@
 /* include support for gcj */
 #undef GC_GCJ_SUPPORT
 
+/* support GNU/Hurd threads */
+#undef GC_GNU_THREADS
+
 /* enables support for HP/UX 11 pthreads */
 #undef GC_HPUX_THREADS
 
--- a/src/boehm-gc/specific.c.orig	2009-02-08 03:44:40.833287000 +0000
+++ b/src/boehm-gc/specific.c	2009-02-08 03:44:50.865199000 +0000
@@ -13,7 +13,7 @@
 
 #include "private/gc_priv.h" /* For GC_compare_and_exchange, GC_memory_barrier */
 
-#if defined(GC_LINUX_THREADS)
+#if defined(GC_LINUX_THREADS) || defined(GC_GNU_THREADS)
 
 #include "private/specific.h"