The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0062-nptl-remove-duplicate-vfork-in-libpthread.patch
1 nptl: remove duplicate vfork() in libpthread
2
3 Automatic patching via two oneliners by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>:
4 sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' $(git grep -l pt-vfork libpthread/nptl/sysdeps)
5 find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \;
6
7 Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 ---
10  .../nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S  | 43 --------------
11  .../nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch |  2 +-
12  .../nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S    | 38 ------------
13  .../sysdeps/unix/sysv/linux/i386/Makefile.arch     |  2 +-
14  .../nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S   | 68 ----------------------
15  .../sysdeps/unix/sysv/linux/mips/Makefile.arch     |  2 +-
16  .../nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S   | 38 ------------
17  .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch  |  2 +-
18  .../unix/sysv/linux/powerpc/powerpc32/pt-vfork.S   | 49 ----------------
19  .../unix/sysv/linux/powerpc/powerpc64/pt-vfork.S   | 49 ----------------
20  .../sysdeps/unix/sysv/linux/powerpc/pt-vfork.S     |  5 --
21  .../nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch  |  2 +-
22  .../nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S     | 65 ---------------------
23  .../sysdeps/unix/sysv/linux/sparc/Makefile.arch    |  2 +-
24  .../nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S  |  5 --
25  .../unix/sysv/linux/sparc/sparc32/pt-vfork.S       | 45 --------------
26  .../unix/sysv/linux/sparc/sparc64/pt-vfork.S       | 45 --------------
27  .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch   |  2 +-
28  .../nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S | 33 -----------
29  19 files changed, 7 insertions(+), 490 deletions(-)
30  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
31  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
32  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
33  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
34  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
35  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
36  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
37  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
38  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
39  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
40  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
41  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
42
43 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
44 deleted file mode 100644
45 index ec5d175..0000000
46 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
47 +++ /dev/null
48 @@ -1,43 +0,0 @@
49 -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
50 -   This file is part of the GNU C Library.
51 -
52 -   The GNU C Library is free software; you can redistribute it and/or
53 -   modify it under the terms of the GNU Lesser General Public
54 -   License as published by the Free Software Foundation; either
55 -   version 2.1 of the License, or (at your option) any later version.
56 -
57 -   The GNU C Library is distributed in the hope that it will be useful,
58 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
59 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
60 -   Lesser General Public License for more details.
61 -
62 -   You should have received a copy of the GNU Lesser General Public
63 -   License along with the GNU C Library; if not, write to the Free
64 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
65 -   02111-1307 USA.  */
66 -
67 -#include <sysdep.h>
68 -#include <tcb-offsets.h>
69 -
70 -#undef PSEUDO_PREPARE_ARGS
71 -#define PSEUDO_PREPARE_ARGS                                            \
72 -       /* Load the current cached pid value across the vfork.  */      \
73 -       rduniq;                                                         \
74 -       ldl     a2, PID_OFFSET(v0);                                     \
75 -       mov     v0, a1;                                                 \
76 -       /* Write back its negation, to indicate that the pid value is   \
77 -          uninitialized in the the child, and in the window between    \
78 -          here and the point at which we restore the value.  */        \
79 -       negl    a2, t0;                                                 \
80 -       stl     t0, PID_OFFSET(v0);
81 -
82 -PSEUDO (__vfork, vfork, 0)
83 -
84 -       /* If we're back in the parent, restore the saved pid.  */
85 -       beq     v0, 1f
86 -       stl     a2, PID_OFFSET(a1)
87 -1:     ret
88 -
89 -PSEUDO_END (__vfork)
90 -
91 -weak_alias (__vfork, vfork)
92 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
93 index 329d8a9..1b0282d 100644
94 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
95 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
96 @@ -5,7 +5,7 @@
97  # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
98  #
99  
100 -libpthread_linux_arch_SSRC = pt-vfork.S
101 +libpthread_linux_arch_SSRC =
102  libpthread_linux_arch_CSRC = pthread_once.c \
103         pt-__syscall_rt_sigaction.c pt-__syscall_error.c \
104         lowlevellock.c
105 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
106 deleted file mode 100644
107 index 9764e9e..0000000
108 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
109 +++ /dev/null
110 @@ -1,38 +0,0 @@
111 -/* Copyright (C) 2005 Free Software Foundation, Inc.
112 -   This file is part of the GNU C Library.
113 -
114 -   The GNU C Library is free software; you can redistribute it and/or
115 -   modify it under the terms of the GNU Lesser General Public
116 -   License as published by the Free Software Foundation; either
117 -   version 2.1 of the License, or (at your option) any later version.
118 -
119 -   The GNU C Library is distributed in the hope that it will be useful,
120 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
121 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
122 -   Lesser General Public License for more details.
123 -
124 -   You should have received a copy of the GNU Lesser General Public
125 -   License along with the GNU C Library; if not, write to the Free
126 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
127 -   02111-1307 USA.  */
128 -
129 -#include <tcb-offsets.h>
130 -
131 -/* Save the PID value.  */
132 -#define SAVE_PID \
133 -       str     lr, [sp, #-4]!;         /* Save LR.  */                 \
134 -       mov     r0, #0xffff0fff;        /* Point to the high page.  */  \
135 -       mov     lr, pc;                 /* Save our return address.  */ \
136 -       sub     pc, r0, #31;            /* Jump to the TLS entry.  */   \
137 -       ldr     lr, [sp], #4;           /* Restore LR.  */              \
138 -       mov     r2, r0;                 /* Save the TLS addr in r2.  */ \
139 -       ldr     r3, [r2, #PID_OFFSET];  /* Load the saved PID.  */      \
140 -       rsb     r0, r3, #0;             /* Negate it.  */               \
141 -       str     r0, [r2, #PID_OFFSET]   /* Store the temporary PID.  */
142 -
143 -/* Restore the old PID value in the parent.  */
144 -#define RESTORE_PID \
145 -       cmp     r0, #0;                 /* If we are the parent... */   \
146 -       strne   r3, [r2, #PID_OFFSET]   /* ... restore the saved PID.  */
147 -
148 -#INCLUDE <../../../../../../../LIBC/SYSDEPS/LINUX/ARM/VFORK.S>
149 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
150 index 9a34595..98e2ae7 100644
151 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
152 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
153 @@ -5,7 +5,7 @@
154  # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
155  #
156  
157 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_spin_unlock.S pthread_once.S
158 +libpthread_linux_arch_SSRC = clone.S pthread_spin_unlock.S pthread_once.S
159  libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c
160  
161  libc_linux_arch_CSRC = fork.c
162 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
163 deleted file mode 100644
164 index aff926a..0000000
165 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
166 +++ /dev/null
167 @@ -1,68 +0,0 @@
168 -/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
169 -   This file is part of the GNU C Library.
170 -   Contributed by Andreas Schwab <schwab@gnu.org>.
171 -
172 -   The GNU C Library is free software; you can redistribute it and/or
173 -   modify it under the terms of the GNU Lesser General Public
174 -   License as published by the Free Software Foundation; either
175 -   version 2.1 of the License, or (at your option) any later version.
176 -
177 -   The GNU C Library is distributed in the hope that it will be useful,
178 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
179 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
180 -   Lesser General Public License for more details.
181 -
182 -   You should have received a copy of the GNU Lesser General Public
183 -   License along with the GNU C Library; if not, write to the Free
184 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
185 -   02111-1307 USA.  */
186 -
187 -#include <sysdep.h>
188 -#define _ERRNO_H       1
189 -#include <bits/errno.h>
190 -#include <bits/kernel-features.h>
191 -#include <tcb-offsets.h>
192 -
193 -/* Save the PID value.  */
194 -#define SAVE_PID \
195 -       movl    %gs:PID, %edx;                                                \
196 -       movl    %edx, %eax;                                                   \
197 -       negl    %eax;                                                         \
198 -       movl    %eax, %gs:PID
199 -
200 -/* Restore the old PID value in the parent.  */
201 -#define RESTORE_PID \
202 -       testl   %eax, %eax;                                                   \
203 -       je      1f;                                                           \
204 -       movl    %edx, %gs:PID;                                                \
205 -1:
206 -
207 -/* Clone the calling process, but without copying the whole address space.
208 -   The calling process is suspended until the new process exits or is
209 -   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
210 -   and the process ID of the new process to the old process.  */
211 -
212 -ENTRY (__vfork)
213 -       /* Pop the return PC value into ECX.  */
214 -       popl    %ecx
215 -
216 -       SAVE_PID
217 -
218 -       /* Stuff the syscall number in EAX and enter into the kernel.  */
219 -       movl    $SYS_ify (vfork), %eax
220 -       int     $0x80
221 -
222 -       RESTORE_PID
223 -
224 -       /* Jump to the return PC.  Don't jump directly since this
225 -          disturbs the branch target cache.  Instead push the return
226 -          address back on the stack.  */
227 -       pushl   %ecx
228 -
229 -       cmpl    $-4095, %eax
230 -       jae     SYSCALL_ERROR_LABEL     /* Branch forward if it failed.  */
231 -L(pseudo_end):
232 -       ret
233 -PSEUDO_END (__vfork)
234 -
235 -weak_alias (__vfork, vfork)
236 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
237 index fc26a8e..cfe2861 100644
238 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
239 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
240 @@ -5,7 +5,7 @@
241  # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
242  #
243  
244 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S
245 +libpthread_linux_arch_SSRC = clone.S
246  libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_rt_sigaction.c
247  
248  libc_linux_arch_CSRC = fork.c
249 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
250 deleted file mode 100644
251 index c02ffca..0000000
252 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
253 +++ /dev/null
254 @@ -1,38 +0,0 @@
255 -/* Copyright (C) 2005 Free Software Foundation, Inc.
256 -   This file is part of the GNU C Library.
257 -
258 -   The GNU C Library is free software; you can redistribute it and/or
259 -   modify it under the terms of the GNU Lesser General Public
260 -   License as published by the Free Software Foundation; either
261 -   version 2.1 of the License, or (at your option) any later version.
262 -
263 -   The GNU C Library is distributed in the hope that it will be useful,
264 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
265 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
266 -   Lesser General Public License for more details.
267 -
268 -   You should have received a copy of the GNU Lesser General Public
269 -   License along with the GNU C Library; if not, write to the Free
270 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
271 -   02111-1307 USA.  */
272 -
273 -#include <features.h>
274 -#include <tls.h>
275 -
276 -/* Save the PID value.  */
277 -#define SAVE_PID \
278 -       READ_THREAD_POINTER(v1);        /* Get the thread pointer.  */  \
279 -       lw      a2, PID_OFFSET(v1);     /* Load the saved PID.  */      \
280 -       subu    a2, $0, a2;             /* Negate it.  */               \
281 -       sw      a2, PID_OFFSET(v1);     /* Store the temporary PID.  */
282 -
283 -/* Restore the old PID value in the parent.  */
284 -#define RESTORE_PID \
285 -       beqz    v0, 1f;                 /* If we are the parent... */   \
286 -       READ_THREAD_POINTER(v1);        /* Get the thread pointer.  */  \
287 -       lw      a2, PID_OFFSET(v1);     /* Load the saved PID.  */      \
288 -       subu    a2, $0, a2;             /* Re-negate it.  */            \
289 -       sw      a2, PID_OFFSET(v1);     /* Restore the PID.  */         \
290 -1:
291 -
292 -#include <../../../../../../../libc/sysdeps/linux/mips/vfork.S>
293 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
294 index 8581aea..0aa285e 100644
295 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
296 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
297 @@ -5,7 +5,7 @@
298  # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
299  #
300  
301 -libpthread_linux_arch_SSRC = pt-vfork.S
302 +libpthread_linux_arch_SSRC =
303  libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_error.c
304  
305  libc_linux_arch_CSRC = fork.c
306 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
307 deleted file mode 100644
308 index 61651fd..0000000
309 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
310 +++ /dev/null
311 @@ -1,49 +0,0 @@
312 -/* Copyright (C) 2004 Free Software Foundation, Inc.
313 -   This file is part of the GNU C Library.
314 -   Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
315 -
316 -   The GNU C Library is free software; you can redistribute it and/or
317 -   modify it under the terms of the GNU Lesser General Public
318 -   License as published by the Free Software Foundation; either
319 -   version 2.1 of the License, or (at your option) any later version.
320 -
321 -   The GNU C Library is distributed in the hope that it will be useful,
322 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
323 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
324 -   Lesser General Public License for more details.
325 -
326 -   You should have received a copy of the GNU Lesser General Public
327 -   License along with the GNU C Library; if not, write to the Free
328 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
329 -   02111-1307 USA.  */
330 -
331 -#include <sysdep.h>
332 -#define _ERRNO_H       1
333 -#include <bits/errno.h>
334 -#include <bits/kernel-features.h>
335 -#include <tcb-offsets.h>
336 -
337 -/* Clone the calling process, but without copying the whole address space.
338 -   The calling process is suspended until the new process exits or is
339 -   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
340 -   and the process ID of the new process to the old process.  */
341 -
342 -ENTRY (__vfork)
343 -       lwz     0,PID(2)
344 -       neg     0,0
345 -       stw     0,PID(2)
346 -
347 -       DO_CALL (SYS_ify (vfork))
348 -
349 -       cmpwi   1,3,0
350 -       beqlr-  1
351 -
352 -       lwz     0,PID(2)
353 -       neg     0,0
354 -       stw     0,PID(2)
355 -
356 -       PSEUDO_RET
357 -
358 -PSEUDO_END (__vfork)
359 -
360 -weak_alias (__vfork, vfork)
361 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
362 deleted file mode 100644
363 index e5b7b53..0000000
364 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
365 +++ /dev/null
366 @@ -1,49 +0,0 @@
367 -/* Copyright (C) 2004 Free Software Foundation, Inc.
368 -   This file is part of the GNU C Library.
369 -   Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
370 -
371 -   The GNU C Library is free software; you can redistribute it and/or
372 -   modify it under the terms of the GNU Lesser General Public
373 -   License as published by the Free Software Foundation; either
374 -   version 2.1 of the License, or (at your option) any later version.
375 -
376 -   The GNU C Library is distributed in the hope that it will be useful,
377 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
378 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
379 -   Lesser General Public License for more details.
380 -
381 -   You should have received a copy of the GNU Lesser General Public
382 -   License along with the GNU C Library; if not, write to the Free
383 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
384 -   02111-1307 USA.  */
385 -
386 -#include <sysdep.h>
387 -#define _ERRNO_H       1
388 -#include <bits/errno.h>
389 -#include <bits/kernel-features.h>
390 -#include <tcb-offsets.h>
391 -
392 -/* Clone the calling process, but without copying the whole address space.
393 -   The calling process is suspended until the new process exits or is
394 -   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
395 -   and the process ID of the new process to the old process.  */
396 -
397 -ENTRY (__vfork)
398 -       lwz     0,PID(13)
399 -       neg     0,0
400 -       stw     0,PID(13)
401 -
402 -       DO_CALL (SYS_ify (vfork))
403 -
404 -       cmpwi   1,3,0
405 -       beqlr-  1
406 -
407 -       lwz     0,PID(13)
408 -       neg     0,0
409 -       stw     0,PID(13)
410 -
411 -       PSEUDO_RET
412 -
413 -PSEUDO_END (__vfork)
414 -
415 -weak_alias (__vfork, vfork)
416 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
417 deleted file mode 100644
418 index 0225219..0000000
419 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
420 +++ /dev/null
421 @@ -1,5 +0,0 @@
422 -#if defined __powerpc64__
423 -# include "powerpc64/pt-vfork.S"
424 -#else
425 -# include "powerpc32/pt-vfork.S"
426 -#endif
427 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
428 index a8249e0..a0c008b 100644
429 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
430 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
431 @@ -5,7 +5,7 @@
432  # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
433  #
434  
435 -libpthread_linux_arch_SSRC = pt-vfork.S pthread_once.S pthread_rwlock_wrlock.S \
436 +libpthread_linux_arch_SSRC = pthread_once.S pthread_rwlock_wrlock.S \
437                         pthread_rwlock_rdlock.S pthread_rwlock_unlock.S \
438                         lowlevellock.S lowlevelrobustlock.S pthread_barrier_wait.S \
439                         pthread_cond_broadcast.S pthread_cond_signal.S \
440 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
441 deleted file mode 100644
442 index 54f2281..0000000
443 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
444 +++ /dev/null
445 @@ -1,65 +0,0 @@
446 -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
447 -   This file is part of the GNU C Library.
448 -
449 -   The GNU C Library is free software; you can redistribute it and/or
450 -   modify it under the terms of the GNU Lesser General Public
451 -   License as published by the Free Software Foundation; either
452 -   version 2.1 of the License, or (at your option) any later version.
453 -
454 -   The GNU C Library is distributed in the hope that it will be useful,
455 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
456 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
457 -   Lesser General Public License for more details.
458 -
459 -   You should have received a copy of the GNU Lesser General Public
460 -   License along with the GNU C Library; if not, write to the Free
461 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
462 -   02111-1307 USA.  */
463 -
464 -#include <sysdep.h>
465 -#define _ERRNO_H       1
466 -#include <bits/errno.h>
467 -#include <tcb-offsets.h>
468 -
469 -/* Clone the calling process, but without copying the whole address space.
470 -   The calling process is suspended until the new process exits or is
471 -   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
472 -   and the process ID of the new process to the old process.  */
473 -
474 -ENTRY (__vfork)
475 -       /* Save the PID value.  */
476 -       stc     gbr, r2
477 -       mov.w   .L2, r0
478 -       mov.l   @(r0,r2), r4
479 -       neg     r4, r1
480 -       mov.l   r1, @(r0,r2)
481 -
482 -       mov.w   .L1, r3
483 -       trapa   #0x10
484 -       mov     r0, r1
485 -
486 -       /* Restore the old PID value in the parent.  */
487 -       tst     r0, r0
488 -       bt/s    2f
489 -        stc    gbr, r2
490 -       mov.w   .L2, r0
491 -       mov.l   r4, @(r0,r2)
492 -       mov     r1, r0
493 -2:
494 -       mov     #-12, r2
495 -       shad    r2, r1
496 -       not     r1, r1                  // r1=0 means r0 = -1 to -4095
497 -       tst     r1, r1                  // i.e. error in linux
498 -       bf      .Lpseudo_end
499 -       SYSCALL_ERROR_HANDLER
500 -.Lpseudo_end:
501 -       rts
502 -        nop
503 -.L1:
504 -       .word   __NR_vfork
505 -.L2:
506 -       .word   PID - TLS_PRE_TCB_SIZE
507 -
508 -PSEUDO_END (__vfork)
509 -
510 -weak_alias (__vfork, vfork)
511 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
512 index 102c0da..8329885 100644
513 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
514 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
515 @@ -5,7 +5,7 @@
516  # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
517  #
518  
519 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S
520 +libpthread_linux_arch_SSRC = clone.S
521  libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \
522         pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \
523         pt-__syscall_error.c
524 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
525 deleted file mode 100644
526 index e8705c5..0000000
527 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
528 +++ /dev/null
529 @@ -1,5 +0,0 @@
530 -#if defined(__arch64__)
531 -#include "sparc64/pt-vfork.S"
532 -#else
533 -#include "sparc32/pt-vfork.S"
534 -#endif
535 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
536 deleted file mode 100644
537 index fb01242..0000000
538 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
539 +++ /dev/null
540 @@ -1,45 +0,0 @@
541 -/* Copyright (C) 2004 Free Software Foundation, Inc.
542 -   This file is part of the GNU C Library.
543 -   Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
544 -
545 -   The GNU C Library is free software; you can redistribute it and/or
546 -   modify it under the terms of the GNU Lesser General Public
547 -   License as published by the Free Software Foundation; either
548 -   version 2.1 of the License, or (at your option) any later version.
549 -
550 -   The GNU C Library is distributed in the hope that it will be useful,
551 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
552 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
553 -   Lesser General Public License for more details.
554 -
555 -   You should have received a copy of the GNU Lesser General Public
556 -   License along with the GNU C Library; if not, write to the Free
557 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
558 -   02111-1307 USA.  */
559 -
560 -#include <sysdep.h>
561 -#include <tcb-offsets.h>
562 -
563 -       .text
564 -       .globl          __syscall_error
565 -ENTRY(__vfork)
566 -       ld      [%g7 + PID], %o5
567 -       sub     %g0, %o5, %o4
568 -       st      %o4, [%g7 + PID]
569 -
570 -       LOADSYSCALL(vfork)
571 -       ta      0x10
572 -       bcc     2f
573 -        mov    %o7, %g1
574 -       st      %o5, [%g7 + PID]
575 -       call    __syscall_error
576 -        mov    %g1, %o7
577 -2:     sub     %o1, 1, %o1
578 -       andcc   %o0, %o1, %o0
579 -       bne,a   1f
580 -        st     %o5, [%g7 + PID]
581 -1:     retl
582 -        nop
583 -END(__vfork)
584 -
585 -weak_alias (__vfork, vfork)
586 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
587 deleted file mode 100644
588 index 8941043..0000000
589 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
590 +++ /dev/null
591 @@ -1,45 +0,0 @@
592 -/* Copyright (C) 2004 Free Software Foundation, Inc.
593 -   This file is part of the GNU C Library.
594 -   Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
595 -
596 -   The GNU C Library is free software; you can redistribute it and/or
597 -   modify it under the terms of the GNU Lesser General Public
598 -   License as published by the Free Software Foundation; either
599 -   version 2.1 of the License, or (at your option) any later version.
600 -
601 -   The GNU C Library is distributed in the hope that it will be useful,
602 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
603 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
604 -   Lesser General Public License for more details.
605 -
606 -   You should have received a copy of the GNU Lesser General Public
607 -   License along with the GNU C Library; if not, write to the Free
608 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
609 -   02111-1307 USA.  */
610 -
611 -#include <sysdep.h>
612 -#include <tcb-offsets.h>
613 -
614 -       .text
615 -       .globl  __syscall_error
616 -ENTRY(__vfork)
617 -       ld      [%g7 + PID], %o5
618 -       sub     %g0, %o5, %o4
619 -       st      %o4, [%g7 + PID]
620 -
621 -       LOADSYSCALL(vfork)
622 -       ta      0x6d
623 -       bcc,pt  %xcc, 2f
624 -        mov    %o7, %g1
625 -       st      %o5, [%g7 + PID]
626 -       call    __syscall_error
627 -        mov    %g1, %o7
628 -2:     sub     %o1, 1, %o1
629 -       andcc   %o0, %o1, %o0
630 -       bne,a,pt %icc, 1f
631 -        st     %o5, [%g7 + PID]
632 -1:     retl
633 -        nop
634 -END(__vfork)
635 -
636 -weak_alias (__vfork, vfork)
637 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
638 index 71df986..10fa3cf 100644
639 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
640 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
641 @@ -5,7 +5,7 @@
642  # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
643  #
644  
645 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_once.S \
646 +libpthread_linux_arch_SSRC = clone.S pthread_once.S \
647         lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \
648         sem_post.S sem_timedwait.S lowlevelrobustlock.S \
649         sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \
650 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
651 deleted file mode 100644
652 index df49496..0000000
653 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
654 +++ /dev/null
655 @@ -1,33 +0,0 @@
656 -/* Copyright (C) 2004 Free Software Foundation, Inc.
657 -   This file is part of the GNU C Library.
658 -
659 -   The GNU C Library is free software; you can redistribute it and/or
660 -   modify it under the terms of the GNU Lesser General Public
661 -   License as published by the Free Software Foundation; either
662 -   version 2.1 of the License, or (at your option) any later version.
663 -
664 -   The GNU C Library is distributed in the hope that it will be useful,
665 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
666 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
667 -   Lesser General Public License for more details.
668 -
669 -   You should have received a copy of the GNU Lesser General Public
670 -   License along with the GNU C Library; if not, write to the Free
671 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
672 -   02111-1307 USA.  */
673 -
674 -#include <tcb-offsets.h>
675 -
676 -#define SAVE_PID \
677 -       movl    %fs:PID, %esi;                                                \
678 -       movl    %esi, %edx;                                                   \
679 -       negl    %edx;                                                         \
680 -       movl    %edx, %fs:PID
681 -
682 -#define RESTORE_PID \
683 -       testq   %rax, %rax;                                                   \
684 -       je      1f;                                                           \
685 -       movl    %esi, %fs:PID;                                                \
686 -1:
687 -
688 -#include <../../../../../../../libc/sysdeps/linux/x86_64/vfork.S>
689 -- 
690 1.8.5.2 (Apple Git-48)
691