diff --git a/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c b/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c
index 77ce286ad250f8dfdf16d966de5bc3987a8d1295..6737019c8928e4153987352fe6f507f7e0c6efa7 100644
--- a/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c
+++ b/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c
@@ -13,9 +13,9 @@
 #include <sys/utsname.h>
 #include <sys/stat.h>
 #include <rffiutils.h>
-#include <R_ext/RStartup.h>
 #define R_INTERFACE_PTRS
 #include <Rinterface.h>
+#include <R_ext/RStartup.h>
 
 extern char **environ;
 
@@ -70,36 +70,6 @@ static char *get_classpath(char *r_home);
 
 # define JMP_BUF sigjmp_buf
 
-/* Evaluation Context Structure */
-typedef struct RCNTXT {
-    struct RCNTXT *nextcontext;	/* The next context up the chain */
-    int callflag;		/* The context "type" */
-    JMP_BUF cjmpbuf;		/* C stack and register information */
-    int cstacktop;		/* Top of the pointer protection stack */
-    int evaldepth;	        /* evaluation depth at inception */
-    SEXP promargs;		/* Promises supplied to closure */
-    SEXP callfun;		/* The closure called */
-    SEXP sysparent;		/* environment the closure was called from */
-    SEXP call;			/* The call that effected this context*/
-    SEXP cloenv;		/* The environment */
-    SEXP conexit;		/* Interpreted "on.exit" code */
-    void (*cend)(void *);	/* C "on.exit" thunk */
-    void *cenddata;		/* data for C "on.exit" thunk */
-    void *vmax;		        /* top of R_alloc stack */
-    int intsusp;                /* interrupts are suspended */
-    SEXP handlerstack;          /* condition handler stack */
-    SEXP restartstack;          /* stack of available restarts */
-    void *prstack;   /* stack of pending promises */
-    void *nodestack;
-#ifdef BC_INT_STACK
-    IStackval *intstack;
-#endif
-    SEXP srcref;	        /* The source line in effect */
-    int browserfinish;     /* should browser finish this context without stopping */
-    SEXP returnValue;			/* only set during on.exit calls */
-} RCNTXT, *context;
-
-
 int Rf_initialize_R(int argc, char *argv[]) {
 	if (initialized) {
 		fprintf(stderr, "%s", "R is already initialized\n");
@@ -201,7 +171,6 @@ int Rf_initialize_R(int argc, char *argv[]) {
 		(*jniEnv)->SetObjectArrayElement(jniEnv, argsArray, i, arg);
 	}
 	// Can't TRACE this upcall as system not initialized
-    R_GlobalContext = malloc(sizeof(struct RCNTXT));
 	engine = checkRef(jniEnv, (*jniEnv)->CallStaticObjectMethod(jniEnv, rembeddedClass, initializeMethod, argsArray));
 	initialized++;
 	return 0;
diff --git a/com.oracle.truffle.r.native/fficall/src/jni/variables.c b/com.oracle.truffle.r.native/fficall/src/jni/variables.c
index 623b68725bfbaddd1b544e9b25bc3eba1cea9a3b..70a830a0fc8294179558bf6abf3e6d0a1a07310c 100644
--- a/com.oracle.truffle.r.native/fficall/src/jni/variables.c
+++ b/com.oracle.truffle.r.native/fficall/src/jni/variables.c
@@ -36,6 +36,7 @@ jmethodID getBaseEnvMethodID;
 jmethodID getBaseNamespaceMethodID;
 jmethodID getNamespaceRegistryMethodID;
 jmethodID isInteractiveMethodID;
+jmethodID getGlobalContextMethodID;
 
 // R_GlobalEnv et al are not a variables in FASTR as they are RContext specific
 SEXP FASTR_GlobalEnv() {
@@ -58,6 +59,11 @@ SEXP FASTR_NamespaceRegistry() {
 	return (*env)->CallStaticObjectMethod(env, CallRFFIHelperClass, getNamespaceRegistryMethodID);
 }
 
+SEXP FASTR_GlobalContext() {
+	JNIEnv *env = getEnv();
+	return (*env)->CallStaticObjectMethod(env, CallRFFIHelperClass, getGlobalContextMethodID);
+}
+
 void init_variables(JNIEnv *env, jobjectArray initialValues) {
 	// initialValues is an array of enums
 	jclass enumClass = (*env)->GetObjectClass(env, (*env)->GetObjectArrayElement(env, initialValues, 0));
@@ -75,6 +81,7 @@ void init_variables(JNIEnv *env, jobjectArray initialValues) {
 	getBaseNamespaceMethodID = checkGetMethodID(env, CallRFFIHelperClass, "getBaseNamespace", "()Ljava/lang/Object;", 1);
 	getNamespaceRegistryMethodID = checkGetMethodID(env, CallRFFIHelperClass, "getNamespaceRegistry", "()Ljava/lang/Object;", 1);
 	isInteractiveMethodID = checkGetMethodID(env, CallRFFIHelperClass, "isInteractive", "()I", 1);
+	getGlobalContextMethodID = checkGetMethodID(env, CallRFFIHelperClass, "getGlobalContext", "()Ljava/lang/Object;", 1);
 
 	int length = (*env)->GetArrayLength(env, initialValues);
 	int index;
diff --git a/com.oracle.truffle.r.native/include/Makefile b/com.oracle.truffle.r.native/include/Makefile
index b2d1e14b4b14fa412c4ce10182e9765eb0303b88..5acbc6b49dc1a05ce37c7e19b4b2206bfe0803dd 100644
--- a/com.oracle.truffle.r.native/include/Makefile
+++ b/com.oracle.truffle.r.native/include/Makefile
@@ -37,19 +37,20 @@ R_EXT_HEADERS_TO_LINK := $(filter-out $(notdir $(R_EXT_HEADERS_LOCAL)),$(R_EXT_H
 R_HEADERS := $(wildcard $(GNUR_HOME)/include/*.h)
 R_HEADERS_FILENAMES := $(notdir $(R_HEADERS))
 #$(info R_HEADERS_FILENAMES=$(R_HEADERS_FILENAMES))
-R_HEADERS_LOCAL := src/libintl.h src/Rinternals.h # src/Rinterface.h
+R_HEADERS_LOCAL := src/libintl.h src/Rinternals.h src/Rinterface.h
 #$(info R_HEADERS_LOCAL=$(R_HEADERS_LOCAL))>
 R_HEADERS_TO_LINK := $(filter-out $(notdir $(R_HEADERS_LOCAL)),$(R_HEADERS_FILENAMES))
 #$(info R_HEADERS_TO_LINK=$(R_HEADERS_TO_LINK))
 
 all: linked
 
-linked: ed_Rinternals ed_Rinterface ed_GraphicsEngine
+linked: ed_Rinternals ed_Rinterface_gcntx ed_Rinterface_interactive ed_GraphicsEngine
 	mkdir -p R_ext
 	$(foreach file,$(R_HEADERS_TO_LINK),ln -sf $(GNUR_HOME)/include/$(file) $(file);)
 	ln -sf src/libintl.h
 	ed $(GNUR_HOME)/include/Rinternals.h < ed_Rinternals
-#	ed $(GNUR_HOME)/include/Rinterface.h < ed_Rinterface
+	ed $(GNUR_HOME)/include/Rinterface.h < ed_Rinterface_gcntx
+#	ed $(GNUR_HOME)/include/Rinterface.h < ed_Rinterface_interactive
 	ed $(GNUR_HOME)/include/R_ext/GraphicsEngine.h < ed_GraphicsEngine
 	$(foreach file,$(R_EXT_HEADERS_TO_LINK),ln -sf $(GNUR_HOME)/include/R_ext/$(file) R_ext/$(file);)
 #	cp $(R_EXT_HEADERS_LOCAL) R_ext
diff --git a/com.oracle.truffle.r.native/include/ed_Rinterface b/com.oracle.truffle.r.native/include/ed_Rinterface
deleted file mode 100644
index 48066ad11ff1bb4db62720f691a37c8be9983563..0000000000000000000000000000000000000000
--- a/com.oracle.truffle.r.native/include/ed_Rinterface
+++ /dev/null
@@ -1,12 +0,0 @@
-/R_Interactive/
-i
-#ifdef FASTR
-LibExtern Rboolean FASTR_Interactive();
-#define R_Interactive FASTR_Interactive()
-#else
-.
-+1
-a
-#endif
-.
-w Rinterface.h
diff --git a/com.oracle.truffle.r.native/include/ed_Rinterface_gcntx b/com.oracle.truffle.r.native/include/ed_Rinterface_gcntx
new file mode 100644
index 0000000000000000000000000000000000000000..29fd2e768ca5fdd160db4c2edbfee7e3947c2b3b
--- /dev/null
+++ b/com.oracle.truffle.r.native/include/ed_Rinterface_gcntx
@@ -0,0 +1,12 @@
+/R_GlobalContext/
+i
+#ifdef FASTR
+extern void* FASTR_GlobalContext();
+#define R_GlobalContext FASTR_GlobalContext()
+#else
+.
++1
+a
+#endif
+.
+w Rinterface.h
diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jnr/CallRFFIHelper.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jnr/CallRFFIHelper.java
index 2a977fa544da4a1ce1d2977d04b2c11a2fda24fd..38fb92a0f82e0b2d286fb3c975b26b599abe7e23 100644
--- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jnr/CallRFFIHelper.java
+++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jnr/CallRFFIHelper.java
@@ -1127,6 +1127,13 @@ public class CallRFFIHelper {
         return x;
     }
 
+    public static Object getGlobalContext() {
+        if (RFFIUtils.traceEnabled()) {
+            RFFIUtils.traceUpCall("getGlobalContext");
+        }
+        return unimplemented("getGlobalContext");
+    }
+
     public static Object getGlobalEnv() {
         if (RFFIUtils.traceEnabled()) {
             RFFIUtils.traceUpCall("getGlobalEnv");