[m-rev.] diff: fix bootstrap at -O6

Zoltan Somogyi zs at csse.unimelb.edu.au
Tue Jul 17 15:35:52 AEST 2007


Fix bootstrap at -O6.

library/thread.m:
	Fix a problem that prevented bootstrapping at -O6. The problem was
	that the compiler created a C module named "thread_module", but the
	source file contained a handwritten module with that name, so gcc
	complained about a doubly defined symbol. The fix is to rename the
	handwritten C module to a name the compiler won't generate.

library/thread.semaphore.m:
library/par_builtin.m:
library/exception.m:
	These are the other three modules in the library with handwritten C
	modules. To prevent any similar problems in future, rename these also
	to something the compiler won't generate.

Zoltan.

cvs diff: Diffing .
Index: exception.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.128
diff -u -b -r1.128 exception.m
--- exception.m	12 Jul 2007 03:04:16 -0000	1.128
+++ exception.m	15 Jul 2007 09:25:01 -0000
@@ -2011,7 +2011,7 @@
         MR_PREDICATE, exception, builtin_throw, 1, 0);
 MR_MAKE_USER_INTERNAL_LAYOUT(exception, builtin_throw, 1, 0, 1);
 
-MR_BEGIN_MODULE(exceptions_module)
+MR_BEGIN_MODULE(hand_written_exception_module)
     MR_init_entry_sl(mercury__exception__builtin_catch_3_0);
     MR_init_entry_sl(mercury__exception__builtin_catch_3_1);
     MR_init_entry_sl(mercury__exception__builtin_catch_3_2);
@@ -2528,7 +2528,7 @@
 mercury_sys_init_exceptions_init(void)
 {
 #ifndef MR_HIGHLEVEL_CODE
-    exceptions_module();
+    hand_written_exception_module();
 #endif
 }
 
Index: par_builtin.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/par_builtin.m,v
retrieving revision 1.11
diff -u -b -r1.11 par_builtin.m
--- par_builtin.m	30 May 2007 08:16:06 -0000	1.11
+++ par_builtin.m	15 Jul 2007 09:23:57 -0000
@@ -213,7 +213,7 @@
 "
 #if (!defined MR_HIGHLEVEL_CODE) && (defined MR_THREAD_SAFE)
 
-    MR_BEGIN_MODULE(par_builtin_module)
+    MR_BEGIN_MODULE(hand_written_par_builtin_module)
         MR_init_entry_ai(mercury__par_builtin__wait_resume);
     MR_BEGIN_CODE
 
@@ -245,7 +245,7 @@
     void mercury_sys_init_par_builtin_modules_init(void)
     {
     #if (!defined MR_HIGHLEVEL_CODE) && (defined MR_THREAD_SAFE)
-        par_builtin_module();
+        hand_written_par_builtin_module();
     #endif
     }
 
Index: thread.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/thread.m,v
retrieving revision 1.10
diff -u -b -r1.10 thread.m
--- thread.m	11 Jun 2007 11:47:13 -0000	1.10
+++ thread.m	15 Jul 2007 09:23:01 -0000
@@ -165,7 +165,7 @@
 
     MR_declare_entry(mercury__do_call_closure_1);
 
-    MR_BEGIN_MODULE(thread_module)
+    MR_BEGIN_MODULE(hand_written_thread_module)
         MR_init_entry_ai(mercury__thread__spawn_begin_thread);
         MR_init_label(mercury__thread__spawn_end_thread);
         MR_init_entry_ai(mercury__thread__yield_resume);
@@ -218,7 +218,7 @@
     void mercury_sys_init_thread_modules_init(void)
     {
     #ifndef MR_HIGHLEVEL_CODE
-        thread_module();
+        hand_written_thread_module();
     #endif
     }
 
Index: thread.semaphore.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/thread.semaphore.m,v
retrieving revision 1.8
diff -u -b -r1.8 thread.semaphore.m
--- thread.semaphore.m	13 Jun 2007 06:36:12 -0000	1.8
+++ thread.semaphore.m	15 Jul 2007 09:24:40 -0000
@@ -373,7 +373,7 @@
 "
 #ifndef MR_HIGHLEVEL_CODE
 
-    MR_BEGIN_MODULE(semaphores_module)
+    MR_BEGIN_MODULE(hand_written_semaphores_module)
         MR_init_entry_ai(mercury__thread__semaphore__nop);
     MR_BEGIN_CODE
 
@@ -395,7 +395,7 @@
     void mercury_sys_init_semaphore_modules_init(void)
     {
     #ifndef MR_HIGHLEVEL_CODE
-        semaphores_module();
+        hand_written_semaphores_module();
     #endif
     }
 
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list