diff --git a/runtime/Makefile b/runtime/Makefile index 8e7e7b5..8826598 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -1,7 +1,7 @@ -CFLAGS = -Wall -DNDEBUG -O3 +CFLAGS = -I/opt/local/include -Wall -DNDEBUG -O3 #CFLAGS = -Wall -g -LDFLAGS = -g -ldl -lgmp -dynamic +LDFLAGS = -L/opt/local/lib -g -ldl -lgmp -rdynamic CC = gcc all: ikarus @@ -49,4 +49,4 @@ ikarus.h: ikarus-data.h touch ikarus.h clean: - rm -f *.o ikarus + rm -f *.o diff --git a/runtime/ikarus b/runtime/ikarus index 2ed6187..2844b2b 100755 Binary files a/runtime/ikarus and b/runtime/ikarus differ diff --git a/runtime/ikarus-enter.s b/runtime/ikarus-enter.s index fa12736..f2bf835 100644 --- a/runtime/ikarus-enter.s +++ b/runtime/ikarus-enter.s @@ -1,10 +1,14 @@ .text +.globl ik_asm_enter .globl _ik_asm_enter .globl ik_underflow_handler +.globl ik_foreign_call .globl _ik_foreign_call +.globl ik_asm_reenter .globl _ik_asm_reenter .align 8 +ik_asm_enter: _ik_asm_enter: # ignored value is the third arg 12(%esp) # code is the second arg 8(%esp) @@ -50,6 +54,7 @@ L_multivalue_underflow: jmp L_do_underflow .align 8 +ik_asm_reenter: _ik_asm_reenter: # argc is at 12(%esp) # scheme stack is third arg 8(%esp) @@ -74,6 +79,7 @@ L_multi_reentry: .align 8 +ik_foreign_call: _ik_foreign_call: movl %esp, 8(%esi) # (movl fpr (pcb-ref 'frame-pointer)) movl %ebp, 0(%esi) # (movl apr (pcb-ref 'allocation-pointer)) diff --git a/runtime/ikarus-fasl.c b/runtime/ikarus-fasl.c index a048202..58f5ba9 100644 --- a/runtime/ikarus-fasl.c +++ b/runtime/ikarus-fasl.c @@ -13,6 +13,9 @@ #include #include +#ifndef RTLD_DEFAULT +#define RTLD_DEFAULT 0 +#endif typedef struct { char* membase;