Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <52925240.7050300@pennware.com>
Date: Sun, 24 Nov 2013 13:23:44 -0600
From: Richard Pennington <rich@...nware.com>
To: musl@...ts.openwall.com
Subject: Clang powerpc pthread_arch.h patch.

I had a problem with clang and __pthread_self() on the powerpc. This is 
the patch I applied to work around it.

Index: pthread_arch.h
===================================================================
--- pthread_arch.h      (revision 3604)
+++ pthread_arch.h      (working copy)
@@ -1,6 +1,11 @@
  static inline struct pthread *__pthread_self()
  {
+#ifdef __clang__
+        char *tp;
+        __asm__ __volatile__ ("mr %0, 2" : "=r" (tp) : : "2" );
+#else
         register char* tp __asm__("r2");
+#endif
         return (pthread_t)(tp - 0x7000 - sizeof(struct pthread));
  }

-Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.