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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
Index: config.make.in
===================================================================
RCS file: /cvsroot/hurd/hurd/config.make.in,v
retrieving revision 1.19
diff -u -p -r1.19 config.make.in
--- config.make.in 7 Nov 2007 13:07:52 -0000 1.19
+++ config.make.in 1 Jan 2008 04:07:44 -0000
@@ -44,6 +44,7 @@ RANLIB = @RANLIB@
MIG = @MIG@
MIGCOM = $(MIG) -cc cat - /dev/null
AWK = @AWK@
+OBJDUMP = objdump
# Compilation flags. Append these to the definitions already made by
# the specific Makefile.
Index: Makefile
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- libpthread/Makefile 19 Nov 2007 17:37:02 -0000 1.7
+++ libpthread/Makefile 31 Dec 2007 21:22:21 -0000
@@ -180,12 +180,12 @@ CPPFLAGS += \
-imacros $(srcdir)/not-in-libc.h
-install: install-headers $(libdir)/libpthread2.a $(libdir)/libpthread2_pic.a
+install: install-headers $(libdir)/libpthread2.a $(libdir)/libpthread2_pic.a $(includedir)/gnu/stubs-pthread.h
install-headers: $(addprefix $(includedir)/, $(sysdeps_headers))
# XXX: If $(libdir)/libpthread2.a is installed and
# $(libdir)/libpthread is not, we can have some issues.
-.PHONY: $(libdir)/libpthread.a $(libdir)/libpthread_pic.a
+.PHONY: $(libdir)/libpthread.a $(libdir)/libpthread_pic.a $(includedir)/gnu/stubs-pthread.h
# XXX: These rules are a hack. But it is better than messing with
# ../Makeconf at the moment. Note that the linker scripts
@@ -199,6 +199,15 @@ $(libdir)/libpthread2_pic.a: $(libdir)/l
mv $< $@
$(INSTALL_DATA) $(srcdir)/libpthread_pic.a $<
+$(includedir)/gnu/stubs-pthread.h: $(OBJS)
+ mkdir -p $(includedir)/gnu
+ $(OBJDUMP) -h $^ | \
+ $(AWK) '/\.gnu\.glibc-stub\./ { \
+ sub(/\.gnu\.glibc-stub\./, "", $$2); \
+ stubs[$$2] = 1; } \
+ END { for (s in stubs) print "#define __stub_" s }' > $@T
+ mv -f $@T $@
+
.PHONY: $(addprefix $(includedir)/, $(sysdeps_headers))
$(addprefix $(includedir)/, $(sysdeps_headers)):
Index: include/libc-symbols.h
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/include/libc-symbols.h,v
retrieving revision 1.1
diff -u -p -r1.1 libc-symbols.h
--- libpthread/include/libc-symbols.h 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/include/libc-symbols.h 1 Jan 2008 15:21:50 -0000
@@ -60,6 +60,7 @@
#define HAVE_ELF
#define HAVE_SECTION_QUOTES
#define HAVE_VISIBILITY_ATTRIBUTE
+#define HAVE_ASM_PREVIOUS_DIRECTIVE
// #define SHARED
/* The symbols in all the user (non-_) macros are C symbols.
@@ -250,6 +251,7 @@
/* A canned warning for sysdeps/stub functions. */
#define stub_warning(name) \
+ __make_section_unallocated (".gnu.glibc-stub." #name) \
link_warning (name, \
"warning: " #name " is not implemented and will always fail")
Index: sysdeps/generic/pt-atfork.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-atfork.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-atfork.c
--- libpthread/sysdeps/generic/pt-atfork.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-atfork.c 31 Dec 2007 21:22:22 -0000
@@ -27,3 +27,5 @@ pthread_atfork (void (*prepare) (void),
{
return ENOSYS;
}
+
+stub_warning (pthread_atfork)
Index: sysdeps/generic/pt-getcpuclockid.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-getcpuclockid.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-getcpuclockid.c
--- libpthread/sysdeps/generic/pt-getcpuclockid.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-getcpuclockid.c 31 Dec 2007 21:22:22 -0000
@@ -30,5 +30,6 @@ pthread_getcpuclockid (pthread_t thread,
return 0;
#else
return ENOSYS;
+stub_warning (pthread_getcpuclockid)
#endif
}
Index: sysdeps/generic/pt-getschedparam.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-getschedparam.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-getschedparam.c
--- libpthread/sysdeps/generic/pt-getschedparam.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-getschedparam.c 31 Dec 2007 21:22:22 -0000
@@ -26,3 +26,5 @@ pthread_getschedparam (pthread_t thread,
{
return ENOSYS;
}
+
+stub_warning (pthread_getschedparam)
Index: sysdeps/generic/pt-key-create.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-key-create.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-key-create.c
--- libpthread/sysdeps/generic/pt-key-create.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-key-create.c 31 Dec 2007 21:22:22 -0000
@@ -25,3 +25,5 @@ pthread_key_create (pthread_key_t *key,
{
return ENOSYS;
}
+
+stub_warning (pthread_key_create)
Index: sysdeps/generic/pt-key-delete.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-key-delete.c,v
retrieving revision 1.2
diff -u -p -r1.2 pt-key-delete.c
--- libpthread/sysdeps/generic/pt-key-delete.c 2 Nov 2002 23:41:51 -0000 1.2
+++ libpthread/sysdeps/generic/pt-key-delete.c 31 Dec 2007 21:22:22 -0000
@@ -25,3 +25,5 @@ pthread_key_delete (pthread_key_t key)
{
return ENOSYS;
}
+
+stub_warning (pthread_key_delete)
Index: sysdeps/generic/pt-mutex-getprioceiling.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-mutex-getprioceiling.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-mutex-getprioceiling.c
--- libpthread/sysdeps/generic/pt-mutex-getprioceiling.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-mutex-getprioceiling.c 31 Dec 2007 21:22:22 -0000
@@ -26,3 +26,5 @@ pthread_mutex_getprioceiling (const pthr
{
return ENOSYS;
}
+
+stub_warning (pthread_mutex_getprioceiling)
Index: sysdeps/generic/pt-mutex-setprioceiling.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-mutex-setprioceiling.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-mutex-setprioceiling.c
--- libpthread/sysdeps/generic/pt-mutex-setprioceiling.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-mutex-setprioceiling.c 31 Dec 2007 21:22:22 -0000
@@ -26,3 +26,5 @@ pthread_mutex_setprioceiling (pthread_mu
{
return ENOSYS;
}
+
+stub_warning (pthread_mutex_setprioceiling)
Index: sysdeps/generic/pt-mutexattr-getprioceiling.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-mutexattr-getprioceiling.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-mutexattr-getprioceiling.c
--- libpthread/sysdeps/generic/pt-mutexattr-getprioceiling.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-mutexattr-getprioceiling.c 31 Dec 2007 21:22:22 -0000
@@ -26,3 +26,5 @@ pthread_mutexattr_getprioceiling (const
{
return ENOSYS;
}
+
+stub_warning (pthread_mutexattr_getprioceiling)
Index: sysdeps/generic/pt-mutexattr-setprioceiling.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-mutexattr-setprioceiling.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-mutexattr-setprioceiling.c
--- libpthread/sysdeps/generic/pt-mutexattr-setprioceiling.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-mutexattr-setprioceiling.c 31 Dec 2007 21:22:22 -0000
@@ -26,3 +26,5 @@ pthread_mutexattr_setprioceiling (pthrea
{
return ENOSYS;
}
+
+stub_warning (pthread_mutexattr_setprioceiling)
Index: sysdeps/generic/pt-setschedparam.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-setschedparam.c,v
retrieving revision 1.2
diff -u -p -r1.2 pt-setschedparam.c
--- libpthread/sysdeps/generic/pt-setschedparam.c 20 Apr 2005 15:26:52 -0000 1.2
+++ libpthread/sysdeps/generic/pt-setschedparam.c 31 Dec 2007 21:22:22 -0000
@@ -26,3 +26,5 @@ pthread_setschedparam (pthread_t thread,
{
return ENOSYS;
}
+
+stub_warning (pthread_setschedparam)
Index: sysdeps/generic/pt-setschedprio.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/pt-setschedprio.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-setschedprio.c
--- libpthread/sysdeps/generic/pt-setschedprio.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/sysdeps/generic/pt-setschedprio.c 31 Dec 2007 21:22:22 -0000
@@ -25,3 +25,5 @@ pthread_setschedprio (pthread_t thread,
{
return ENOSYS;
}
+
+stub_warning (pthread_setschedprio)
|