unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 189724824c1f6c10575e26737df10e9ca9841a5b 2240 bytes (raw)
name: gnu/packages/patches/libpthread-glibc-preparation.patch 	 # note: path name is non-authoritative(*)

 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
 
This patch helps to integrate the Hurd's libpthread as a libc add-on.

It writes the configure file, removes an rpc call not yet 
implemented on the version of gnumach we use and defines
a missing macro.

diff --git a/libpthread/configure b/libpthread/configure
new file mode 100644
index 0000000..2cdbc71
--- /dev/null
+++ b/libpthread/configure
@@ -0,0 +1,2 @@
+libc_add_on_canonical=libpthread
+libc_add_on_subdirs=.
-- 
1.9.0

We are using a version of GNU Mach that lacks 'thread_terminate_release'
(not introduced yet).  The 'thread_terminate' RPC call will be enough for
our needs.
See <http://lists.gnu.org/archive/html/bug-hurd/2014-05/msg00127.html>.

diff --git a/libpthread/sysdeps/mach/pt-thread-terminate.c b/libpthread/sysdeps/mach/pt-thread-terminate.c
index 6672065..129a611 100644
--- a/libpthread/sysdeps/mach/pt-thread-terminate.c
+++ b/libpthread/sysdeps/mach/pt-thread-terminate.c
@@ -70,9 +70,9 @@ __pthread_thread_terminate (struct __pthread *thread)
   __mach_port_destroy (__mach_task_self (), wakeup_port);
 
   /* Terminate and release all that's left.  */
-  err = __thread_terminate_release (kernel_thread, mach_task_self (),
-				    kernel_thread, reply_port,
-				    stackaddr, stacksize);
+  /* err = __thread_terminate_release (kernel_thread, mach_task_self (), */
+  /* 				    kernel_thread, reply_port, */
+  /* 				    stackaddr, stacksize); */
 
   /* The kernel does not support it yet.  Leak but at least terminate
      correctly.  */
-- 
1.9.2

The __PTHREAD_SPIN_LOCK_INITIALIZER definition is missing, so we 
define it to __SPIN_LOCK_INITIALIZER which already exists.
See <http://lists.gnu.org/archive/html/commit-hurd/2009-04/msg00006.html>.
  
diff --git a/libpthread/sysdeps/mach/bits/spin-lock.h b/libpthread/sysdeps/mach/bits/spin-lock.h
index 537dac9..fca0e5a 100644
--- a/libpthread/sysdeps/mach/bits/spin-lock.h
+++ b/libpthread/sysdeps/mach/bits/spin-lock.h
@@ -30,7 +30,7 @@ typedef __spin_lock_t __pthread_spinlock_t;
 
 /* Initializer for a spin lock object.  */
 #ifndef __PTHREAD_SPIN_LOCK_INITIALIZER
-#error __PTHREAD_SPIN_LOCK_INITIALIZER undefined: should be defined by <lock-intern.h>.
+#define __PTHREAD_SPIN_LOCK_INITIALIZER __SPIN_LOCK_INITIALIZER
 #endif
 
 __END_DECLS

debug log:

solving 1897248 ...
found 1897248 in https://yhetil.org/guix-devel/CAFtzXzM9qWM=9h2n9S-Rk1sxuPfexq0FWQgEyT8QNtrBQgZe8w@mail.gmail.com/ ||
	https://yhetil.org/guix-devel/CAFtzXzOEE-SBtTRYKyFKiThsg7eO1J=J2VZKb+8xrCvD7HX_=A@mail.gmail.com/ ||
	https://yhetil.org/guix-devel/CAFtzXzNY4onwTvYkKJGNk=mePjb6obU44sTw-dVrqRk+ThLiAA@mail.gmail.com/

applying [1/1] https://yhetil.org/guix-devel/CAFtzXzM9qWM=9h2n9S-Rk1sxuPfexq0FWQgEyT8QNtrBQgZe8w@mail.gmail.com/
diff --git a/gnu/packages/patches/libpthread-glibc-preparation.patch b/gnu/packages/patches/libpthread-glibc-preparation.patch
new file mode 100644
index 0000000..1897248

1:9: trailing whitespace.
It writes the configure file, removes an rpc call not yet 
1:21: trailing whitespace.
-- 
1:35: trailing whitespace.
 
1:43: trailing whitespace.
 
1:46: trailing whitespace.
-- 
Checking patch gnu/packages/patches/libpthread-glibc-preparation.patch...
Applied patch gnu/packages/patches/libpthread-glibc-preparation.patch cleanly.
warning: squelched 4 whitespace errors
warning: 9 lines add whitespace errors.

skipping https://yhetil.org/guix-devel/CAFtzXzOEE-SBtTRYKyFKiThsg7eO1J=J2VZKb+8xrCvD7HX_=A@mail.gmail.com/ for 1897248
skipping https://yhetil.org/guix-devel/CAFtzXzNY4onwTvYkKJGNk=mePjb6obU44sTw-dVrqRk+ThLiAA@mail.gmail.com/ for 1897248
index at:
100644 189724824c1f6c10575e26737df10e9ca9841a5b	gnu/packages/patches/libpthread-glibc-preparation.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).