1999-08-08 15:27:18 +02:00
|
|
|
## Process this with automake to create Makefile.in
|
|
|
|
|
2004-11-23 05:11:31 +01:00
|
|
|
AUTOMAKE_OPTIONS = foreign subdir-objects
|
2015-01-12 17:19:59 +01:00
|
|
|
|
2012-12-29 17:25:27 +01:00
|
|
|
ACLOCAL_AMFLAGS = -I .. -I ../config
|
1999-08-08 15:27:18 +02:00
|
|
|
|
2009-06-09 12:21:19 +02:00
|
|
|
SUBDIRS = include testsuite man
|
2003-09-04 16:47:05 +02:00
|
|
|
|
2015-01-12 17:19:59 +01:00
|
|
|
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj \
|
|
|
|
ChangeLog.libffi ChangeLog.libffi-3.1 \
|
|
|
|
m4/libtool.m4 m4/lt~obsolete.m4 \
|
2012-12-26 17:28:02 +01:00
|
|
|
m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
2015-01-12 17:19:59 +01:00
|
|
|
m4/ltversion.m4 src/debug.c msvcc.sh \
|
|
|
|
generate-darwin-source-and-headers.py \
|
|
|
|
libffi.xcodeproj/project.pbxproj \
|
|
|
|
libtool-ldflags
|
2012-12-26 17:28:02 +01:00
|
|
|
|
2012-12-29 17:25:27 +01:00
|
|
|
# Automake Documentation:
|
|
|
|
# If your package has Texinfo files in many directories, you can use the
|
|
|
|
# variable TEXINFO_TEX to tell Automake where to find the canonical
|
|
|
|
# `texinfo.tex' for your package. The value of this variable should be
|
|
|
|
# the relative path from the current `Makefile.am' to `texinfo.tex'.
|
|
|
|
TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
|
|
|
|
|
|
|
|
# Defines info, dvi, pdf and html targets
|
|
|
|
MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
|
2012-12-26 17:28:02 +01:00
|
|
|
info_TEXINFOS = doc/libffi.texi
|
2009-06-09 12:21:19 +02:00
|
|
|
|
2012-12-29 17:25:27 +01:00
|
|
|
# AM_CONDITIONAL on configure option --generated-files-in-srcdir
|
|
|
|
if GENINSRC
|
|
|
|
STAMP_GENINSRC = stamp-geninsrc
|
|
|
|
else
|
|
|
|
STAMP_GENINSRC =
|
|
|
|
endif
|
|
|
|
|
|
|
|
# AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
|
|
|
|
if BUILD_INFO
|
|
|
|
STAMP_BUILD_INFO = stamp-build-info
|
|
|
|
else
|
|
|
|
STAMP_BUILD_INFO =
|
|
|
|
endif
|
|
|
|
|
|
|
|
all-local: $(STAMP_GENINSRC)
|
|
|
|
|
|
|
|
stamp-geninsrc: doc/libffi.info
|
|
|
|
cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
doc/libffi.info: $(STAMP_BUILD_INFO)
|
|
|
|
|
|
|
|
stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
|
|
|
|
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) doc/libffi.info
|
|
|
|
MAINTAINERCLEANFILES = $(srcdir)/doc/libffi.info
|
|
|
|
|
2000-05-01 23:35:35 +02:00
|
|
|
## ################################################################
|
|
|
|
|
|
|
|
##
|
|
|
|
## This section is for make and multilib madness.
|
|
|
|
##
|
|
|
|
|
|
|
|
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
|
|
|
# values defined in terms of make variables, as is the case for CC and
|
|
|
|
# friends when we are called from the top level Makefile.
|
|
|
|
AM_MAKEFLAGS = \
|
2015-01-16 21:51:14 +01:00
|
|
|
"AR_FLAGS=$(AR_FLAGS)" \
|
|
|
|
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
|
|
|
"CFLAGS=$(CFLAGS)" \
|
|
|
|
"CXXFLAGS=$(CXXFLAGS)" \
|
|
|
|
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
|
|
|
|
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
|
|
|
|
"INSTALL=$(INSTALL)" \
|
|
|
|
"INSTALL_DATA=$(INSTALL_DATA)" \
|
|
|
|
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
|
|
|
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
|
|
|
"JC1FLAGS=$(JC1FLAGS)" \
|
|
|
|
"LDFLAGS=$(LDFLAGS)" \
|
|
|
|
"LIBCFLAGS=$(LIBCFLAGS)" \
|
|
|
|
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
|
|
|
"MAKE=$(MAKE)" \
|
|
|
|
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
|
|
|
"PICFLAG=$(PICFLAG)" \
|
|
|
|
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
|
|
|
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
|
|
|
"SHELL=$(SHELL)" \
|
|
|
|
"exec_prefix=$(exec_prefix)" \
|
|
|
|
"infodir=$(infodir)" \
|
|
|
|
"libdir=$(libdir)" \
|
|
|
|
"mandir=$(mandir)" \
|
|
|
|
"prefix=$(prefix)" \
|
|
|
|
"AR=$(AR)" \
|
|
|
|
"AS=$(AS)" \
|
|
|
|
"CC=$(CC)" \
|
|
|
|
"CXX=$(CXX)" \
|
|
|
|
"LD=$(LD)" \
|
|
|
|
"NM=$(NM)" \
|
|
|
|
"RANLIB=$(RANLIB)" \
|
|
|
|
"DESTDIR=$(DESTDIR)"
|
2000-05-01 23:35:35 +02:00
|
|
|
|
2012-02-27 11:00:12 +01:00
|
|
|
# Subdir rules rely on $(FLAGS_TO_PASS)
|
|
|
|
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
|
|
|
|
|
2000-05-01 23:35:35 +02:00
|
|
|
MAKEOVERRIDES=
|
|
|
|
|
2015-01-12 17:19:59 +01:00
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
pkgconfig_DATA = libffi.pc
|
|
|
|
|
1999-08-08 15:27:18 +02:00
|
|
|
toolexeclib_LTLIBRARIES = libffi.la
|
2002-03-17 01:35:21 +01:00
|
|
|
noinst_LTLIBRARIES = libffi_convenience.la
|
1999-08-08 15:27:18 +02:00
|
|
|
|
2012-12-26 17:28:02 +01:00
|
|
|
libffi_la_SOURCES = src/prep_cif.c src/types.c \
|
ffi.h.in (ffi_closure_alloc, [...]): New.
libffi/ChangeLog:
* include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
(ffi_prep_closure_loc): New.
(ffi_prep_raw_closure_loc): New.
(ffi_prep_java_raw_closure_loc): New.
* src/closures.c: New file.
* src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
Replace sflags with exec_offset.
[FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
sub_segment_exec_offset): New macros.
(get_segment_flags, set_segment_flags, check_segment_merge): New
macros.
(is_mmapped_segment, is_extern_segment): Use get_segment_flags.
(add_segment, sys_alloc, create_mspace, create_mspace_with_base,
destroy_mspace): Use new macros.
(sys_alloc): Silence warning.
* Makefile.am (libffi_la_SOURCES): Add src/closures.c.
* Makefile.in: Rebuilt.
* src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
terms of ffi_prep_closure_loc.
* src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
from...
(ffi_prep_raw_closure): ... this. Re-implement in terms of the
renamed version.
* src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
adjusted from...
(ffi_prep_java_raw_closure): ... this. Re-implement in terms of
the renamed version.
* src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
* src/pa/ffi.c: Likewise.
* src/cris/ffi.c: Likewise. Adjust.
* src/frv/ffi.c: Likewise.
* src/ia64/ffi.c: Likewise.
* src/mips/ffi.c: Likewise.
* src/powerpc/ffi_darwin.c: Likewise.
* src/s390/ffi.c: Likewise.
* src/sh/ffi.c: Likewise.
* src/sh64/ffi.c: Likewise.
* src/sparc/ffi.c: Likewise.
* src/x86/ffi64.c: Likewise.
* src/x86/ffi.c: Likewise.
(FFI_INIT_TRAMPOLINE): Adjust.
(ffi_prep_raw_closure_loc): Renamed and adjusted from...
(ffi_prep_raw_closure): ... this.
* src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
(flush_icache): Adjust.
boehm-gc/ChangeLog:
* include/gc.h (GC_REGISTER_FINALIZER_UNREACHABLE): New.
(GC_register_finalizer_unreachable): Declare.
(GC_debug_register_finalizer_unreachable): Declare.
* finalize.c (GC_unreachable_finalize_mark_proc): New.
(GC_register_finalizer_unreachable): New.
(GC_finalize): Handle it.
* dbg_mlc.c (GC_debug_register_finalizer_unreachable): New.
(GC_debug_register_finalizer_no_order): Fix whitespace.
libjava/ChangeLog:
* include/jvm.h (_Jv_ClosureListFinalizer): New.
(_Jv_Linker::create_error_method): Adjust.
* boehm.cc (_Jv_ClosureListFinalizer): New.
* nogc.cc (_Jv_ClosureListFinalizer): New.
* java/lang/Class.h (class _Jv_ClosureList): New.
(class java::lang::Class): Declare it as friend.
* java/lang/natClass.cc (_Jv_ClosureList::releaseClosures): New.
(_Jv_ClosureList::registerClousure): New.
* include/execution.h (_Jv_ExecutionEngine): Add get_closure_list.
(_Jv_CompiledEngine::do_get_closure_list): New.
(_Jv_CompiledEngine::_Jv_CompiledEngine): Use it.
(_Jv_IndirectCompiledClass): Add closures.
(_Jv_IndirectCompiledEngine::get_aux_info): New.
(_Jv_IndirectCompiledEngine::do_allocate_field_initializers): Use
it.
(_Jv_IndirectCompiledEngine::do_get_closure_list): New.
(_Jv_IndirectCompiledEngine::_Jv_IndirectCompiledEngine): Use it.
(_Jv_InterpreterEngine::do_get_closure_list): Declare.
(_Jv_InterpreterEngine::_Jv_InterpreterEngine): Use it.
* interpret.cc (FFI_PREP_RAW_CLOSURE): Use _loc variants.
(node_closure): Add closure list.
(_Jv_InterpMethod::ncode): Add jclass argument. Use
ffi_closure_alloc and the separate code pointer. Register the
closure for finalization.
(_Jv_JNIMethod::ncode): Likewise.
(_Jv_InterpreterEngine::do_create_ncode): Pass klass to ncode.
(_Jv_InterpreterEngine::do_get_closure_list): New.
* include/java-interp.h (_Jv_InterpMethod::ncode): Adjust.
(_Jv_InterpClass): Add closures field.
(_Jv_JNIMethod::ncode): Adjust.
* defineclass.cc (_Jv_ClassReader::handleCodeAttribute): Adjust.
(_Jv_ClassReader::handleMethodsEnd): Likewise.
* link.cc (struct method_closure): Add closure list.
(_Jv_Linker::create_error_method): Add jclass argument. Use
ffi_closure_alloc and the separate code pointer. Register the
closure for finalization.
(_Jv_Linker::link_symbol_table): Remove outdated comment about
sharing of otable and atable. Adjust.
* java/lang/reflect/natVMProxy.cc (ncode_closure): Add closure
list.
(ncode): Add jclass argument. Use ffi_closure_alloc and the
separate code pointer. Register the closure for finalization.
(java::lang::reflect::VMProxy::generateProxyClass): Adjust.
* testsuite/libjava.jar/TestClosureGC.java: New.
* testsuite/libjava.jar/TestClosureGC.out: New.
* testsuite/libjava.jar/TestClosureGC.xfail: New.
* testsuite/libjava.jar/TestClosureGC.jar: New.
From-SVN: r122652
2007-03-07 08:27:25 +01:00
|
|
|
src/raw_api.c src/java_raw_api.c src/closures.c
|
1999-08-08 15:27:18 +02:00
|
|
|
|
2012-12-26 17:28:02 +01:00
|
|
|
if FFI_DEBUG
|
2015-01-12 17:19:59 +01:00
|
|
|
libffi_la_SOURCES += src/debug.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
noinst_HEADERS = \
|
|
|
|
src/aarch64/ffitarget.h src/aarch64/internal.h \
|
|
|
|
src/alpha/ffitarget.h src/alpha/internal.h \
|
|
|
|
src/arc/ffitarget.h \
|
|
|
|
src/arm/ffitarget.h src/arm/internal.h \
|
|
|
|
src/avr32/ffitarget.h \
|
|
|
|
src/bfin/ffitarget.h \
|
|
|
|
src/cris/ffitarget.h \
|
|
|
|
src/frv/ffitarget.h \
|
|
|
|
src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
|
|
|
src/m32r/ffitarget.h \
|
|
|
|
src/m68k/ffitarget.h \
|
|
|
|
src/m88k/ffitarget.h \
|
|
|
|
src/metag/ffitarget.h \
|
|
|
|
src/microblaze/ffitarget.h \
|
|
|
|
src/mips/ffitarget.h \
|
|
|
|
src/moxie/ffitarget.h \
|
|
|
|
src/nios2/ffitarget.h \
|
|
|
|
src/or1k/ffitarget.h \
|
|
|
|
src/pa/ffitarget.h \
|
|
|
|
src/powerpc/ffitarget.h src/powerpc/asm.h src/powerpc/ffi_powerpc.h \
|
|
|
|
src/s390/ffitarget.h \
|
|
|
|
src/sh/ffitarget.h \
|
|
|
|
src/sh64/ffitarget.h \
|
|
|
|
src/sparc/ffitarget.h src/sparc/internal.h \
|
|
|
|
src/tile/ffitarget.h \
|
|
|
|
src/vax/ffitarget.h \
|
|
|
|
src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \
|
|
|
|
src/xtensa/ffitarget.h \
|
|
|
|
src/dlmalloc.c
|
|
|
|
|
|
|
|
EXTRA_libffi_la_SOURCES = \
|
|
|
|
src/aarch64/ffi.c src/aarch64/sysv.S \
|
|
|
|
src/alpha/ffi.c src/alpha/osf.S \
|
|
|
|
src/arc/ffi.c src/arc/arcompact.S \
|
|
|
|
src/arm/ffi.c src/arm/sysv.S \
|
|
|
|
src/avr32/ffi.c src/avr32/sysv.S \
|
|
|
|
src/bfin/ffi.c src/bfin/sysv.S \
|
|
|
|
src/cris/ffi.c src/cris/sysv.S \
|
|
|
|
src/frv/ffi.c src/frv/eabi.S \
|
|
|
|
src/ia64/ffi.c src/ia64/unix.S \
|
|
|
|
src/m32r/ffi.c src/m32r/sysv.S \
|
|
|
|
src/m68k/ffi.c src/m68k/sysv.S \
|
|
|
|
src/m88k/ffi.c src/m88k/obsd.S \
|
|
|
|
src/metag/ffi.c src/metag/sysv.S \
|
|
|
|
src/microblaze/ffi.c src/microblaze/sysv.S \
|
|
|
|
src/mips/ffi.c src/mips/o32.S src/mips/n32.S \
|
|
|
|
src/moxie/ffi.c src/moxie/eabi.S \
|
|
|
|
src/nios2/ffi.c src/nios2/sysv.S \
|
|
|
|
src/or1k/ffi.c src/or1k/sysv.S \
|
|
|
|
src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
|
|
|
|
src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c \
|
|
|
|
src/powerpc/sysv.S src/powerpc/linux64.S \
|
|
|
|
src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
|
|
|
|
src/powerpc/aix.S src/powerpc/darwin.S src/powerpc/aix_closure.S \
|
|
|
|
src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c \
|
|
|
|
src/s390/ffi.c src/s390/sysv.S \
|
|
|
|
src/sh/ffi.c src/sh/sysv.S \
|
|
|
|
src/sh64/ffi.c src/sh64/sysv.S \
|
|
|
|
src/sparc/ffi.c src/sparc/ffi64.c src/sparc/v8.S src/sparc/v9.S \
|
|
|
|
src/tile/ffi.c src/tile/tile.S \
|
|
|
|
src/vax/ffi.c src/vax/elfbsd.S \
|
|
|
|
src/x86/ffi.c src/x86/sysv.S \
|
|
|
|
src/x86/ffiw64.c src/x86/win64.S \
|
|
|
|
src/x86/ffi64.c src/x86/unix64.S \
|
|
|
|
src/x86/darwin64.S src/x86/darwin.S \
|
|
|
|
src/x86/darwin64_c.c src/x86/darwin_c.c \
|
|
|
|
src/xtensa/ffi.c src/xtensa/sysv.S
|
|
|
|
|
|
|
|
TARGET_OBJ = @TARGET_OBJ@
|
|
|
|
libffi_la_LIBADD = $(TARGET_OBJ)
|
1999-08-08 15:27:18 +02:00
|
|
|
|
2004-03-11 20:59:49 +01:00
|
|
|
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
2015-01-12 17:19:59 +01:00
|
|
|
EXTRA_libffi_convenience_la_SOURCES = $(EXTRA_libffi_la_SOURCES)
|
|
|
|
libffi_convenience_la_LIBADD = $(libffi_la_LIBADD)
|
|
|
|
libffi_convenience_la_DEPENDENCIES = $(libffi_la_DEPENDENCIES)
|
2004-03-11 20:59:49 +01:00
|
|
|
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
|
|
|
|
2008-05-09 12:10:53 +02:00
|
|
|
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
|
|
|
|
|
2015-01-12 17:19:59 +01:00
|
|
|
AM_CFLAGS = -Wall -g -fexceptions
|
|
|
|
if FFI_DEBUG
|
|
|
|
# Build debug. Define FFI_DEBUG on the commandline so that, when building with
|
|
|
|
# MSVC, it can link against the debug CRT.
|
|
|
|
AM_CFLAGS += -DFFI_DEBUG
|
|
|
|
endif
|
|
|
|
|
2016-03-03 00:28:11 +01:00
|
|
|
if LIBAT_BUILD_VERSIONED_SHLIB
|
|
|
|
if LIBAT_BUILD_VERSIONED_SHLIB_GNU
|
2016-03-03 02:40:29 +01:00
|
|
|
libffi_version_script = -Wl,--version-script,libffi.map
|
|
|
|
libffi_version_dep = libffi.map
|
2016-03-03 00:28:11 +01:00
|
|
|
endif
|
|
|
|
if LIBAT_BUILD_VERSIONED_SHLIB_SUN
|
|
|
|
libffi_version_script = -Wl,-M,libffi.map-sun
|
|
|
|
libffi_version_dep = libffi.map-sun
|
2016-03-03 02:40:29 +01:00
|
|
|
libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \
|
2016-03-03 00:28:11 +01:00
|
|
|
$(libffi_la_OBJECTS) $(libffi_la_LIBADD)
|
2016-03-03 11:30:25 +01:00
|
|
|
perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \
|
2016-03-03 14:40:30 +01:00
|
|
|
`echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
|
2016-03-03 11:30:25 +01:00
|
|
|
sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
|
|
|
|
> $@ || (rm -f $@ ; exit 1)
|
2016-03-03 00:28:11 +01:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
libffi_version_script =
|
|
|
|
libffi_version_dep =
|
|
|
|
endif
|
|
|
|
libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
|
|
|
|
2016-03-03 02:40:29 +01:00
|
|
|
libffi.map: $(top_srcdir)/libffi.map.in
|
|
|
|
$(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $<
|
|
|
|
|
2016-03-03 00:28:11 +01:00
|
|
|
libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
|
|
|
libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
|
1999-08-08 15:27:18 +02:00
|
|
|
|
2004-06-15 16:47:55 +02:00
|
|
|
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
|
|
|
|
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
2006-05-24 03:45:57 +02:00
|
|
|
|
2007-01-18 08:17:57 +01:00
|
|
|
# Multilib support. Automake should provide these on its own.
|
|
|
|
all-recursive: all-multi
|
|
|
|
install-recursive: install-multi
|
|
|
|
mostlyclean-recursive: mostlyclean-multi
|
|
|
|
clean-recursive: clean-multi
|
|
|
|
distclean-recursive: distclean-multi
|
|
|
|
maintainer-clean-recursive: maintainer-clean-multi
|