I'll try to dedicate some time to helping on this but I can't promise
anything.   I'll take a longer look at Xavier's work later tonight or
tomorrow.

However, I needed the following trivial patch to build with gcc 4.4.5
on Debian:

diff --git a/variable.c b/variable.c
index 551a7d5..908a649 100644
--- a/variable.c
+++ b/variable.c
@@ -19,6 +19,7 @@
 #include "constant.h"
 #include "internal.h"
 
+VALUE rb_feature_provided_2(VALUE); /* move to ruby/intern.h ? */
 void rb_vm_change_state(void);
 void rb_vm_inc_const_missing_count(void);
 
-- 
Eric Wong