USE_LIBFFI change

From-SVN: r42791
This commit is contained in:
Anthony Green 2001-06-02 08:49:31 +00:00 committed by Anthony Green
parent 6a6a4abb1a
commit c8fb98139d
11 changed files with 390 additions and 323 deletions

View File

@ -1,3 +1,21 @@
2001-06-02 Anthony Green <green@redhat.com>
* configure: Rebuild.
* configure.in (LIBFFIINCS, LIBFFI): Introduce. Add
--without-libffi option. Tweak --disable-java-net processing.
* Makefile.in: Rebuild.
* Makefile.am (LIBFFIINCS, LIBFFI): Use.
* include/config.h.in: Rebuild.
* acconfig.h (USE_LIBFFI): Define.
* java/lang/reflect/natMethod.c: Use USE_LIBFFI.
2001-06-02 Anthony Green <green@redhat.com>
* configure: Rebuilt.
* configure.in: Test for sigaction on native builds.
* prims.cc: Check HAVE_SIGACTION.
* include/config.h.in: Rebuilt.
2001-05-31 Jeff Sturm <jsturm@one-point.com>
* natFile.cc (get_entry): Removed functions.

View File

@ -105,7 +105,7 @@ endif
JCFLAGS = -g
JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include
LIBFFIINCS = @LIBFFIINCS@
INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
$(GCINCS) $(THREADINCS) $(INCLTDL) \
@ -260,7 +260,7 @@ libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
@echo $(libgcj_la_OBJECTS) > libgcj.objectlist;
@echo $(libgcj_la_LIBADD) >> libgcj.objectlist;
$(libgcj_la_LINK) -objectlist libgcj.objectlist \
../libffi/libfficonvenience.la \
@LIBFFI@ \
-rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
libgcjx.la: $(libgcjx_la_OBJECTS) $(libgcjx_la_DEPENDENCIES)

View File

@ -88,6 +88,7 @@ HASH_SYNC_SPEC = @HASH_SYNC_SPEC@
INCLTDL = @INCLTDL@
JC1GCSPEC = @JC1GCSPEC@
LIBDATASTARTSPEC = @LIBDATASTARTSPEC@
LIBFFI = @LIBFFI@
LIBGCJDEBUG = @LIBGCJDEBUG@
LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
@ -121,43 +122,29 @@ here = @here@
libgcj_basedir = @libgcj_basedir@
AUTOMAKE_OPTIONS = foreign
@TESTSUBDIR_TRUE@SUBDIRS = \
@TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
@TESTSUBDIR_FALSE@SUBDIRS = \
@TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
@USE_LIBDIR_TRUE@toolexeclibdir = \
@USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexeclibdir = \
@USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexecdir = \
@USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
@XLIB_AWT_TRUE@cond_x_ltlibrary = \
@XLIB_AWT_TRUE@libgcjx.la
@XLIB_AWT_FALSE@cond_x_ltlibrary = \
@TESTSUBDIR_TRUE@SUBDIRS = @TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
@TESTSUBDIR_FALSE@SUBDIRS = @TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
@XLIB_AWT_TRUE@cond_x_ltlibrary = @XLIB_AWT_TRUE@libgcjx.la
@XLIB_AWT_FALSE@cond_x_ltlibrary =
toolexeclib_LTLIBRARIES = libgcj.la $(cond_x_ltlibrary)
toolexeclib_DATA = libgcj.spec
data_DATA = libgcj.jar
@NEEDS_DATA_START_TRUE@toolexeclib_LIBRARIES = \
@NEEDS_DATA_START_TRUE@libgcjdata.a
@NEEDS_DATA_START_TRUE@libgcjdata_a_SOURCES = \
@NEEDS_DATA_START_TRUE@libgcjdata.c
@NEEDS_DATA_START_TRUE@toolexeclib_LIBRARIES = @NEEDS_DATA_START_TRUE@libgcjdata.a
@NEEDS_DATA_START_TRUE@libgcjdata_a_SOURCES = @NEEDS_DATA_START_TRUE@libgcjdata.c
@NATIVE_TRUE@bin_PROGRAMS = \
@NATIVE_TRUE@jv-convert gij
@NATIVE_TRUE@bin_PROGRAMS = @NATIVE_TRUE@jv-convert gij
bin_SCRIPTS = addr2name.awk
@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = \
@CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = \
@CANADIAN_TRUE@@NULL_TARGET_FALSE@jar
@CANADIAN_FALSE@ZIP = \
@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
@CANADIAN_TRUE@GCJH = \
@CANADIAN_TRUE@gcjh
@CANADIAN_FALSE@GCJH = \
@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_FALSE@jar
@CANADIAN_FALSE@ZIP = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
@CANADIAN_TRUE@GCJH = @CANADIAN_TRUE@gcjh
@CANADIAN_FALSE@GCJH = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8
@ -176,15 +163,13 @@ AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions \
-fdollars-in-identifiers \
@LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE
@USING_GCC_TRUE@AM_CFLAGS = \
@USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
@USING_GCC_FALSE@AM_CFLAGS = \
@USING_GCC_FALSE@@LIBGCJ_CFLAGS@
@USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
@USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@
JCFLAGS = -g
JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include
LIBFFIINCS = @LIBFFIINCS@
INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
$(GCINCS) $(THREADINCS) $(INCLTDL) \
@ -247,8 +232,7 @@ extra_headers = java/lang/Object.h java/lang/Class.h
NM = nm
@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = \
@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = @NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
CONVERT_DIR = gnu/gcj/convert
@ -1269,7 +1253,7 @@ libgcj-test.spec.in libgcj.spec.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
DIST_SUBDIRS = @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include
DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
@ -2213,7 +2197,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -2464,7 +2448,7 @@ libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
@echo $(libgcj_la_OBJECTS) > libgcj.objectlist;
@echo $(libgcj_la_LIBADD) >> libgcj.objectlist;
$(libgcj_la_LINK) -objectlist libgcj.objectlist \
../libffi/libfficonvenience.la \
@LIBFFI@ \
-rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
libgcjx.la: $(libgcjx_la_OBJECTS) $(libgcjx_la_DEPENDENCIES)

View File

@ -113,6 +113,9 @@
/* Define if java.net native functions should be stubbed out. */
#undef DISABLE_JAVA_NET
/* Define if we're to use libffi. */
#undef USE_LIBFFI
/* Define if system properties shouldn't be read from
getenv("GCJ_PROPERTIES"). */
#undef DISABLE_GETENV_PROPERTIES

578
libjava/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -170,6 +170,22 @@ if test "$enable_java_net" = no; then
AC_DEFINE(DISABLE_JAVA_NET)
fi
dnl See if the user wants to configure without libffi. Some
dnl architectures don't support it, and default values are set in
dnl configure.host.
AC_ARG_WITH(libffi,
[ --without-libffi don't use libffi],,with_libffi=${with_libffi_default-yes})
LIBFFI=
LIBFFIINCS=
if test "$with_libffi" != no; then
AC_DEFINE(USE_LIBFFI)
LIBFFI=../libffi/libfficonvenience.la
LIBFFIINCS="-I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include"
fi
AC_SUBST(LIBFFI)
AC_SUBST(LIBFFIINCS)
dnl See if the user wants to disable JVMPI support.
AC_ARG_ENABLE(jvmpi,
[ --disable-jvmpi disable JVMPI support])

View File

@ -89,6 +89,8 @@ HASH_SYNC_SPEC = @HASH_SYNC_SPEC@
INCLTDL = @INCLTDL@
JC1GCSPEC = @JC1GCSPEC@
LIBDATASTARTSPEC = @LIBDATASTARTSPEC@
LIBFFI = @LIBFFI@
LIBFFIINCS = @LIBFFIINCS@
LIBGCJDEBUG = @LIBGCJDEBUG@
LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
@ -135,7 +137,7 @@ DIST_COMMON = ./stamp-h2.in Makefile.am Makefile.in libgcj-config.h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
@ -232,7 +234,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \

View File

@ -89,6 +89,8 @@ HASH_SYNC_SPEC = @HASH_SYNC_SPEC@
INCLTDL = @INCLTDL@
JC1GCSPEC = @JC1GCSPEC@
LIBDATASTARTSPEC = @LIBDATASTARTSPEC@
LIBFFI = @LIBFFI@
LIBFFIINCS = @LIBFFIINCS@
LIBGCJDEBUG = @LIBGCJDEBUG@
LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
@ -134,7 +136,7 @@ DIST_COMMON = ./stamp-h1.in Makefile.am Makefile.in config.h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
@ -231,7 +233,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \

View File

@ -131,6 +131,9 @@
/* Define if java.net native functions should be stubbed out. */
#undef DISABLE_JAVA_NET
/* Define if we're to use libffi. */
#undef USE_LIBFFI
/* Define if system properties shouldn't be read from
getenv("GCJ_PROPERTIES"). */
#undef DISABLE_GETENV_PROPERTIES

View File

@ -44,7 +44,11 @@ details. */
#include <stdlib.h>
#if USE_LIBFFI
#include <ffi.h>
#else
#include <java/lang/UnsupportedOperationException.h>
#endif
// FIXME: remove these.
#define BooleanClass java::lang::Boolean::class$
@ -107,6 +111,7 @@ can_widen (jclass from, jclass to)
return fromx <= tox;
}
#ifdef USE_LIBFFI
static inline ffi_type *
get_ffi_type (jclass klass)
{
@ -148,6 +153,7 @@ get_ffi_type (jclass klass)
return r;
}
#endif // USE_LIBFFI
jobject
java::lang::reflect::Method::invoke (jobject obj, jobjectArray args)
@ -312,6 +318,7 @@ _Jv_CallAnyMethodA (jobject obj,
jvalue *args,
jvalue *result)
{
#ifdef USE_LIBFFI
JvAssert (! is_constructor || ! obj);
JvAssert (! is_constructor || return_type);
@ -428,6 +435,10 @@ _Jv_CallAnyMethodA (jobject obj,
result->l = obj;
return ex;
#else
throw new java::lang::UnsupportedOperationException;
return 0;
#endif // USE_LIBFFI
}
// This is another version of _Jv_CallAnyMethodA, but this one does

View File

@ -89,6 +89,8 @@ HASH_SYNC_SPEC = @HASH_SYNC_SPEC@
INCLTDL = @INCLTDL@
JC1GCSPEC = @JC1GCSPEC@
LIBDATASTARTSPEC = @LIBDATASTARTSPEC@
LIBFFI = @LIBFFI@
LIBFFIINCS = @LIBFFIINCS@
LIBGCJDEBUG = @LIBGCJDEBUG@
LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
@ -143,7 +145,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
@ -171,7 +173,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \