unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob cbb3551e01ec144fa8888b9becb53539f44e9662 1861 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
 
This will allow libpthread to be build as an addon.

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=.
\ No newline at end of file
-- 
1.9.0

There is no definition for  __thread_terminate_release yet, so according to Samuel we disable it.

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

__SPIN_LOCK_INITIALIZER gets defined to zero so we can start using libpthread.

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 cbb3551 ...
found cbb3551 in https://yhetil.org/guix-devel/CAFtzXzMBfcemYpb=+_RcGNyPDyV5haUJ6W3TxpVpqRN0Gi6j8g@mail.gmail.com/

applying [1/1] https://yhetil.org/guix-devel/CAFtzXzMBfcemYpb=+_RcGNyPDyV5haUJ6W3TxpVpqRN0Gi6j8g@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..cbb3551

1:18: trailing whitespace.
-- 
1:29: trailing whitespace.
 
1:37: trailing whitespace.
 
1:40: trailing whitespace.
-- 
1:50: trailing whitespace.
 
Checking patch gnu/packages/patches/libpthread-glibc-preparation.patch...
Applied patch gnu/packages/patches/libpthread-glibc-preparation.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

index at:
100644 cbb3551e01ec144fa8888b9becb53539f44e9662	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).