This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED PATCH] Fix powerpc fork after i386 reorganization.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Fri, 16 May 2014 11:25:41 -0700 (PDT)
- Subject: Re: [COMMITTED PATCH] Fix powerpc fork after i386 reorganization.
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1405142105400 dot 21615 at digraph dot polyomino dot org dot uk> <1400252942 dot 30618 dot 8 dot camel at ubuntu-sellcey>
> It looks like you changed this for MIPS but my build is still failing:
I was afraid that might happen, though I hadn't thought of it when I was
making the changes. #include_next is too subtle.
I've committed the following and tested it still works on x86_64 and i686.
It should fix the mips and powerpc builds. Please verify that it does.
Thanks,
Roland
2014-05-16 Roland McGrath <roland@hack.frob.com>
* sysdeps/unix/sysv/linux/i386/fork.h: Moved ...
* sysdeps/unix/sysv/linux/i386/arch-fork.h: ... here.
Don't do #include_next.
* sysdeps/unix/sysv/linux/x86_64/fork.h: Moved ...
* sysdeps/unix/sysv/linux/x86_64/arch-fork.h: ... here.
Don't do #include_next.
* sysdeps/unix/sysv/linux/mips/arch-fork.h: New file.
* sysdeps/unix/sysv/linux/mips/fork.h: File removed.
* sysdeps/unix/sysv/linux/powerpc/arch-fork.h: New file.
* sysdeps/unix/sysv/linux/powerpc/fork.h: File removed.
--- a/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -29,6 +29,7 @@
#include <atomic.h>
#include <pthreadP.h>
#include <fork.h>
+#include <arch-fork.h>
unsigned long int *__fork_generation_pointer;
--- a/sysdeps/unix/sysv/linux/i386/fork.h
+++ b/sysdeps/unix/sysv/linux/i386/arch-fork.h
@@ -18,10 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sched.h>
+#include <sysdep.h>
+#include <tls.h>
#define ARCH_FORK() \
INLINE_SYSCALL (clone, 5, \
CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, \
NULL, NULL, &THREAD_SELF->tid)
-
-#include_next <fork.h>
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/arch-fork.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/arch-fork.h>
--- a/sysdeps/unix/sysv/linux/mips/fork.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fork.h>
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/arch-fork.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/arch-fork.h>
--- a/sysdeps/unix/sysv/linux/powerpc/fork.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fork.h>
--- a/sysdeps/unix/sysv/linux/x86_64/fork.h
+++ b/sysdeps/unix/sysv/linux/x86_64/arch-fork.h
@@ -18,10 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sched.h>
+#include <sysdep.h>
+#include <tls.h>
#define ARCH_FORK() \
INLINE_SYSCALL (clone, 4, \
CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, \
NULL, &THREAD_SELF->tid)
-
-#include_next <fork.h>