This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: fixincludes __thread and pthread.h for HEAD


Hello

fixincludes for HEAD does not substitute all the __thread occurrences
in pthread.h on my Debian testing (libc6_2.2.5-4) box.  It leaves

 extern int pthread_create (pthread_t *__restrict __thread,

unchanged and gcc consequently fails to bootstrap.  I don't really
understand how to make fixincl patches, I changed inclhack.def but the
bootstrap appears to use fixincl.x. I could not work out the magic
incantation required to regenerate fixincl.x so I simply modified it
by hand...


2002-05-22  Philip Martin  <philip@codematters.co.uk>

        * fixinc/inclhack.def(thread_keyword): Match all __thread occurrences
        * fixinc/fixincl.x: ditto


Index: inclhack.def
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.130
diff -u -r1.130 inclhack.def
--- inclhack.def	22 May 2002 02:59:19 -0000	1.130
+++ inclhack.def	22 May 2002 20:05:11 -0000
@@ -2892,9 +2892,9 @@
     hackname  = thread_keyword;
     files     = "pthread.h";
     files     = "bits/sigthread.h";
-    select    = "pthread_t __thread([^a-z0-9_])";
+    select    = "([^a-zA-Z0-9_])__thread([^a-zA-Z0-9_])";
     c_fix     = format;
-    c_fix_arg = 'pthread_t __thr%1';
+    c_fix_arg = '%1__thr%2';
 
     test_text = "extern int pthread_kill (pthread_t __thread, int __signo);";
 };
Index: fixincl.x
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/fixinc/fixincl.x,v
retrieving revision 1.126
diff -u -r1.126 fixincl.x
--- fixincl.x	22 May 2002 03:04:28 -0000	1.126
+++ fixincl.x	22 May 2002 20:05:09 -0000
@@ -4587,7 +4587,7 @@
  *  content selection pattern - do fix if pattern found
  */
 tSCC zThread_KeywordSelect0[] =
-       "pthread_t __thread([^a-z0-9_])";
+       "([^a-zA-Z0-9_])__thread([^a-zA-Z0-9_])";
 
 #define    THREAD_KEYWORD_TEST_CT  1
 static tTestDesc aThread_KeywordTests[] = {
@@ -4598,7 +4598,7 @@
  */
 static const char* apzThread_KeywordPatch[] = {
     "format",
-    "pthread_t __thr%1",
+    "%1__thr%2",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *

-- 
Philip


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]