Hi,

Attached is a patch that fixes some compile errors with an especially
anal GCC found in Ubuntu feisty.  There will have to be corresponding
(void) casts for the branch instructions found in CodeGenerator-ppc.st
and CodeGenerator-arm.st, but I don't have access to machines to test
those changes on, so I'm leaving them as an exercise for the
reader. ;)

In this patch is also a little tweak to the idc script that really
helps in trying to find the idc1 command to run under gdb with the -v
option: display the environment variables.

Have fun,

-- 
Michael FIG <[EMAIL PROTECTED]> //\
   http://michael.fig.org/    \//

diff -r 630f5f4a2526 function/jolt-burg/CodeGenerator-i386.st
--- a/function/jolt-burg/CodeGenerator-i386.st	Fri Nov 16 01:45:01 2007 -0600
+++ b/function/jolt-burg/CodeGenerator-i386.st	Fri Nov 16 01:53:44 2007 -0600
@@ -253,11 +253,11 @@ DynamicIntel32CodeGenerator cmplR: s R: 
 DynamicIntel32CodeGenerator cmplR: s R: d	  { CMPLrr	(      _R(s)	,	_R(d)	 ); }
 DynamicIntel32CodeGenerator idivlR: s		  { IDIVLrr	(      _R(s)	,	_EAX	 ); }
 DynamicIntel32CodeGenerator imullR: s R: d	  { IMULLrr	(      _R(s)	,	_R(d)	 ); }
-DynamicIntel32CodeGenerator jeL: l		  { JEm		(_A(l),    0,0,0		 ); }
-DynamicIntel32CodeGenerator jgeL: l		  { JGEm	(_A(l),	   0,0,0		 ); }
-DynamicIntel32CodeGenerator jmpMb: b		  { JMPm	(    0,_R(b),0,0		 ); }
-DynamicIntel32CodeGenerator jmpL: l		  { JMPm	(_A(l),	   0,0,0		 ); }
-DynamicIntel32CodeGenerator jneL: l		  { JNEm	(_A(l),	   0,0,0		 ); }
+DynamicIntel32CodeGenerator jeL: l		  { (void)JEm	(_A(l),    0,0,0		 ); }
+DynamicIntel32CodeGenerator jgeL: l		  { (void)JGEm	(_A(l),	   0,0,0		 ); }
+DynamicIntel32CodeGenerator jmpMb: b		  { (void)JMPm	(    0,_R(b),0,0		 ); }
+DynamicIntel32CodeGenerator jmpL: l		  { (void)JMPm	(_A(l),	   0,0,0		 ); }
+DynamicIntel32CodeGenerator jneL: l		  { (void)JNEm	(_A(l),	   0,0,0		 ); }
 DynamicIntel32CodeGenerator lealMd: d b: b R: r	  { LEALmr	(_I(d),_R(b),0,0,	_R(r)	 ); }
 DynamicIntel32CodeGenerator lealMd_: _d b: b R: r { LEALmr	(_P(d),_R(b),0,0,	_R(r)	 ); }
 DynamicIntel32CodeGenerator movbR: r Mb: b	  { MOVBrm	(      _R(r)	,     0,_R(b),0,0); }
diff -r 630f5f4a2526 object/boot/src/libid.c
--- a/object/boot/src/libid.c	Fri Nov 16 01:45:01 2007 -0600
+++ b/object/boot/src/libid.c	Fri Nov 16 01:53:45 2007 -0600
@@ -95,7 +95,8 @@ static oop s__delegate= 0;
 
 typedef struct t__object   _object_t;
 typedef struct t__selector _selector_t;
-typedef struct t__closure  _closure_t;
+/* We use struct __closure directly to avoid type-punning errors. */
+typedef struct __closure   _closure_t;
 typedef struct t__assoc    _assoc_t;
 typedef struct t__vector   _vector_t;
 typedef struct t__vtable   _vtable_t;
@@ -120,12 +121,7 @@ static oop _assoc_vtable= 0;
 static oop _assoc_vtable= 0;
 static oop _assoc= 0;
 
-struct t__closure
-{
-  oop		 method;
-  oop		 data;
-};
-
+/* t__closure is just __closure */
 static oop _closure_vtable= 0;
 static oop _closure= 0;
 
@@ -360,7 +356,7 @@ static oop _vtable__methodAt_put_with_(o
       assoc->assoc.value= new(_closure);
       _vtable__add_(0, self, self, assoc);
     }
-  assoc->assoc.value->closure.method= method;
+  assoc->assoc.value->closure.method= (_imp_t)method;
   assoc->assoc.value->closure.data= data;
   _libid_flush(selector);
   return assoc->assoc.value;
diff -r 630f5f4a2526 object/id/libid.c
--- a/object/id/libid.c	Fri Nov 16 01:45:01 2007 -0600
+++ b/object/id/libid.c	Fri Nov 16 01:53:45 2007 -0600
@@ -97,7 +97,8 @@ static oop s__delegate= 0;
 
 typedef struct t__object   _object_t;
 typedef struct t__selector _selector_t;
-typedef struct t__closure  _closure_t;
+/* We use struct __closure directly to avoid type-punning errors. */
+typedef struct __closure   _closure_t;
 typedef struct t__assoc    _assoc_t;
 typedef struct t__vector   _vector_t;
 typedef struct t__vtable   _vtable_t;
@@ -122,12 +123,7 @@ static oop _assoc_vtable= 0;
 static oop _assoc_vtable= 0;
 static oop _assoc= 0;
 
-struct t__closure
-{
-  oop		 method;
-  oop		 data;
-};
-
+/* t__closure is just __closure */
 static oop _closure_vtable= 0;
 static oop _closure= 0;
 
@@ -367,7 +363,7 @@ static oop _vtable__methodAt_put_with_(o
       assoc->assoc.value= new(_closure);
       _vtable__add_(0, self, self, assoc);
     }
-  assoc->assoc.value->closure.method= method;
+  assoc->assoc.value->closure.method= (_imp_t)method;
   assoc->assoc.value->closure.data= data;
   _libid_flush(selector);
   return assoc->assoc.value;
diff -r 630f5f4a2526 object/idc/idc.in
--- a/object/idc/idc.in	Fri Nov 16 01:45:01 2007 -0600
+++ b/object/idc/idc.in	Fri Nov 16 01:53:45 2007 -0600
@@ -231,9 +231,11 @@ ccflags="$ccflags -I${prefix}"
 [ -z "$prefix" ] || {
   libfix=${prefix}
   expr "//$libfix" : '///' >/dev/null || libfix="$PWD/$libfix"
+  $verbose
   LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-${libfix}}
+  IDC_LIBDIR=${IDC_LIBDIR:-${libfix}}
+  set +x
   export LD_LIBRARY_PATH
-  IDC_LIBDIR=${IDC_LIBDIR:-${libfix}}
   export IDC_LIBDIR
 }
 
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to