Skip to content

Commit

Permalink
Disable FFI for all platforms due to build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshikatsu Fujita committed Jan 3, 2020
1 parent 7b48b06 commit 820aa1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PROG = ypsilon

PREFIX = /usr/local

CPPFLAGS = -DNDEBUG -DSYSTEM_SHARE_PATH='"$(DESTDIR)$(PREFIX)/share/$(PROG)"' -DSYSTEM_EXTENSION_PATH='"$(DESTDIR)$(PREFIX)/lib/$(PROG)"'
CPPFLAGS = -DNO_FFI -DNDEBUG -DSYSTEM_SHARE_PATH='"$(DESTDIR)$(PREFIX)/share/$(PROG)"' -DSYSTEM_EXTENSION_PATH='"$(DESTDIR)$(PREFIX)/lib/$(PROG)"'

CXXFLAGS = -pipe -O2 -fstrict-aliasing

Expand Down Expand Up @@ -49,13 +49,13 @@ ifneq (,$(findstring Linux, $(UNAME)))
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = -a32
SRCS += ffi_stub_linux_ppc.s
#SRCS += ffi_stub_linux_ppc.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = -a64
SRCS += ffi_stub_linux64_ppc.s
#SRCS += ffi_stub_linux64_ppc.s
endif
LDLIBS = -lpthread -ldl
else
Expand Down Expand Up @@ -107,13 +107,13 @@ ifneq (,$(findstring Linux, $(UNAME)))
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = --32
SRCS += ffi_stub_linux.s
#SRCS += ffi_stub_linux.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = --64
SRCS += ffi_stub_linux64.s
#SRCS += ffi_stub_linux64.s
endif
LDLIBS = -pthread -Wl,--no-as-needed -ldl
endif
Expand Down Expand Up @@ -151,13 +151,13 @@ ifneq (,$(findstring FreeBSD, $(UNAME)))
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = --32
SRCS += ffi_stub_freebsd.s
#SRCS += ffi_stub_freebsd.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = --64
SRCS += ffi_stub_freebsd64.s
#SRCS += ffi_stub_freebsd64.s
endif
ifneq (,$(findstring kFreeBSD, $(UNAME)))
LDLIBS = -pthread -ldl
Expand Down Expand Up @@ -198,13 +198,13 @@ ifneq (,$(findstring OpenBSD, $(UNAME)))
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = --32
SRCS += ffi_stub_openbsd.s
#SRCS += ffi_stub_openbsd.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = --64
SRCS += ffi_stub_openbsd64.s
#SRCS += ffi_stub_openbsd64.s
endif
LDLIBS = -pthread
endif
Expand Down Expand Up @@ -239,13 +239,13 @@ ifneq (,$(findstring SunOS, $(UNAME)))
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = --32
SRCS += ffi_stub_sunos.s
#SRCS += ffi_stub_sunos.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = --64
SRCS += ffi_stub_sunos64.s
#SRCS += ffi_stub_sunos64.s
endif
LDLIBS = -lpthread -ldl -lxnet
endif
Expand All @@ -259,7 +259,7 @@ ifneq (,$(findstring Darwin, $(UNAME)))
CPPFLAGS += -DNO_TLS
ASFLAGS += -arch i386
LDFLAGS += -arch i386 -Wl,-no_pie
SRCS += ffi_stub_darwin.s
#SRCS += ffi_stub_darwin.s
ifneq (,$(shell ls -1 /Library/Frameworks /System/Library/Frameworks | grep 'SDL.framework'))
EXTS += SDLMain.dylib
endif
Expand Down
11 changes: 11 additions & 0 deletions src/ffi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@

#define C_STACK_COERCE_ARGUMENTS 1

#if NO_FFI

scm_obj_t make_callback(VM* vm, int type, const char* signatures, scm_closure_t closure)
{
fatal("%s:%u ffi not supported on this build", __FILE__, __LINE__);
}

#else

#if ARCH_IA32
const char*
c_stack_frame_t::push(scm_obj_t obj, int signature)
Expand Down Expand Up @@ -1908,3 +1917,5 @@
fatal("%s:%u ffi not supported on this build", __FILE__, __LINE__);
}
#endif

#endif // NO_FFI

0 comments on commit 820aa1b

Please sign in to comment.