diff mbox

[COMMITTED] Fix powerpc fork after i386 reorganization.

Message ID 20140516182541.5F4852C3A49@topped-with-meat.com
State New
Headers show

Commit Message

Roland McGrath May 16, 2014, 6:25 p.m. UTC
> 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.

Comments

Steve Ellcey May 16, 2014, 8:38 p.m. UTC | #1
On Fri, 2014-05-16 at 11:25 -0700, Roland McGrath wrote:
> > 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

Well, I am not getting that error anymore but now my MIPS build dies
while linking libc.so:

/local/home/sellcey/nightly/obj-mips-mti-linux-gnu/glibc/obj_default/libc_pic.os: In function `_IO_new_proc_close':
/local/home/sellcey/nightly/src/glibc/libio/iopopen.c:347: undefined reference to `__waitpid_nocancel'
/local/home/sellcey/nightly/src/glibc/libio/iopopen.c:345: undefined reference to `__waitpid_nocancel'
/local/home/sellcey/nightly/install-mips-mti-linux-gnu/lib/gcc/mips-mti-linux-gnu/4.10.0/../../../../mips-mti-linux-gnu/bin/ld: /local/home/sellcey/nightly/obj-mips-mti-linux-gnu/glibc/obj_default/libc.so: hidden symbol `__waitpid_nocancel' isn't defined
/local/home/sellcey/nightly/install-mips-mti-linux-gnu/lib/gcc/mips-mti-linux-gnu/4.10.0/../../../../mips-mti-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Steve Ellcey
sellcey@mips.com
diff mbox

Patch

--- 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>