aboutsummaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog129
-rw-r--r--libffi/ChangeLog.libgcj7
-rw-r--r--libffi/Makefile.am44
-rw-r--r--libffi/Makefile.in159
-rw-r--r--libffi/README4
-rwxr-xr-xlibffi/configure310
-rw-r--r--libffi/configure.in40
-rw-r--r--libffi/fficonfig.h.in3
-rw-r--r--libffi/include/ffi.h.in22
-rw-r--r--libffi/src/ia64/ffi.c9
-rw-r--r--libffi/src/ia64/unix.S35
-rw-r--r--libffi/src/java_raw_api.c1
-rw-r--r--libffi/src/mips/n32.s14
-rw-r--r--libffi/src/mips/o32.s2
-rw-r--r--libffi/src/powerpc/aix_closure.S251
-rw-r--r--libffi/src/powerpc/darwin_closure.S189
-rw-r--r--libffi/src/powerpc/ffi_darwin.c329
-rw-r--r--libffi/src/powerpc/ppc_closure.S194
-rw-r--r--libffi/src/sparc/v8.S61
-rw-r--r--libffi/src/sparc/v9.S50
-rw-r--r--libffi/src/x86/ffi.c126
21 files changed, 1568 insertions, 411 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index ad33876a7dc..feb559cb113 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,132 @@
+2003-02-05 Release Manager
+
+ * GCC 3.2.2 Released.
+
+2003-01-29 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * src/powerpc/ppc_closure.S: Recode to fit shared libs.
+
+2002-11-19 Release Manager
+
+ * GCC 3.2.1 Released.
+
+2002-11-19 Release Manager
+
+ * GCC 3.2.1 Released.
+
+2002-11-18 Release Manager
+
+ * GCC 3.2.1 Released.
+
+2002-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.am (all-multi): Fix multilib parallel build.
+
+2002-08-14 Release Manager
+
+ * GCC 3.2 Released.
+
+2002-07-25 Release Manager
+
+ * GCC 3.1.1 Released.
+
+2002-05-28 Bo Thorsen <bo@suse.de>
+
+ * src/x86/ffi.c (ffi_prep_incoming_args_SYSV): Remove avn
+ here too.
+
+2002-05-27 Roger Sayle <roger@eyesopen.com>
+
+ * src/x86/ffi.c (ffi_prep_args): Remove reference to avn.
+
+2002-05-27 Bo Thorsen <bo@suse.de>
+
+ * src/x86/ffi.c (ffi_prep_args): Remove unused variable and
+ fix formatting.
+
+2002-05-14 Release Manager
+
+ * GCC 3.1 Released.
+
+2002-05-14 Release Manager
+
+ * GCC 3.1 Released.
+
+2002-05-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
+ script entry, and set LD to it when configuring multilibs.
+ * configure: Rebuilt.
+
+2002-04-28 David S. Miller <davem@redhat.com>
+
+ * configure.in, configure: Fix SPARC test in previous change.
+
+2002-04-28 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.in (HAVE_AS_SPARC_UA_PCREL): Check for working
+ %r_disp32().
+ * src/sparc/v8.S: Use it.
+ * src/sparc/v9.S: Likewise.
+ * fficonfig.h.in: Rebuilt.
+ * configure: Rebuilt.
+
+2002-04-08 Hans Boehm <Hans_Boehm@hp.com>
+
+ * src/java_raw_api.c (ffi_java_raw_size): Handle FFI_TYPE_DOUBLE
+ correctly.
+ * src/ia64/unix.S: Add unwind information. Fix comments.
+ Save sp in a way that's compatible with unwind info.
+ (ffi_call_unix): Correctly restore sp in all cases.
+ * src/ia64/ffi.c: Add, fix comments.
+
+2002-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * src/sparc/v8.S: Make .eh_frame dependent on target word size.
+
+2002-04-04 Jeff Sturm <jsturm@one-point.com>
+
+ * src/sparc/v8.S: Add unwind info.
+ * src/sparc/v9.S: Likewise.
+
+2002-04-01 Loren J. Rittle <ljrittle@acm.org>
+
+ * configure.in: Enable alpha*-*-freebsd*.
+ * configure: Rebuilt.
+
+2002-03-30 Krister Walfridsson <cato@df.lth.se>
+
+ * configure.in: Enable i*86-*-netbsdelf*.
+ * configure: Rebuilt.
+
+2002-03-29 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ PR other/2620
+ * src/mips/n32.s: Delete
+ * src/mips/o32.s: Delete
+
+2002-03-17 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
+
+ * Makefile.am: libfficonvenience -> libffi_convenience.
+ * Makefile.in: Rebuilt.
+
+ * Makefile.am: Define ffitest_OBJECTS.
+ * Makefile.in: Rebuilt.
+
+2002-03-07 Andreas Tobler <toa@pop.agri.ch>
+ David Edelsohn <edelsohn@gnu.org>
+
+ * Makefile.am (EXTRA_DIST): Add Darwin and AIX closure files.
+ (TARGET_SRC_POWERPC_AIX): Add aix_closure.S.
+ (TARGET_SRC_POWERPC_DARWIN): Add darwin_closure.S.
+ * Makefile.in: Regenerate.
+ * include/ffi.h.in: Add AIX and Darwin closure definitions.
+ * src/powerpc/ffi_darwin.c (ffi_prep_closure): New function.
+ (flush_icache, flush_range): New functions.
+ (ffi_closure_helper_DARWIN): New function.
+ * src/powerpc/aix_closure.S: New file.
+ * src/powerpc/darwin_closure.S: New file.
+
2002-02-24 Jeff Sturm <jsturm@one-point.com>
* include/ffi.h.in: Add typedef for ffi_arg.
diff --git a/libffi/ChangeLog.libgcj b/libffi/ChangeLog.libgcj
index 4c5be6d3fd0..751b31b3b2f 100644
--- a/libffi/ChangeLog.libgcj
+++ b/libffi/ChangeLog.libgcj
@@ -1,3 +1,10 @@
+2002-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
+ Remove USE_LIBDIR conditional.
+ * Makefile.am (toolexecdir, toolexeclibdir): Don't override.
+ * Makefile.in, configure: Rebuilt.
+
Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* include/Makefile.in: Rebuilt.
diff --git a/libffi/Makefile.am b/libffi/Makefile.am
index 04cc125e595..21ba58ef48e 100644
--- a/libffi/Makefile.am
+++ b/libffi/Makefile.am
@@ -14,6 +14,7 @@ EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
src/powerpc/ppc_closure.S src/powerpc/asm.h \
src/powerpc/ffi_darwin.c \
src/powerpc/darwin.S src/powerpc/aix.S \
+ src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
src/arm/ffi.c src/arm/sysv.S
VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
@@ -72,21 +73,12 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-## Install a library built with a cross compiler in tooldir, not
-## libdir.
-if USE_LIBDIR
-toolexeclibdir = $(libdir)$(MULTISUBDIR)
-else
-toolexecdir = $(exec_prefix)/$(target_alias)
-toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
-endif
-
toolexeclib_LTLIBRARIES = libffi.la
-noinst_LTLIBRARIES = libfficonvenience.la
+noinst_LTLIBRARIES = libffi_convenience.la
noinst_PROGRAMS = ffitest
-ffitest_SOURCES = src/ffitest.c
+ffitest_OBJECTS = ffitest.lo
ffitest_LDADD = libffi.la
ffitest_LDFLAGS = -shared-libgcc
@@ -99,8 +91,8 @@ TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
-TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S
-TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S
+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
+TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
@@ -109,51 +101,51 @@ libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
src/raw_api.c src/java_raw_api.c
if MIPS_GCC
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
endif
if MIPS_SGI
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
endif
if X86
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
endif
if X86_WIN32
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
endif
if SPARC
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
endif
if ALPHA
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
endif
if IA64
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
endif
if M68K
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
endif
if POWERPC
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
endif
if POWERPC_AIX
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
endif
if POWERPC_DARWIN
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
endif
if ARM
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
-libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
endif
AM_CFLAGS = -fexceptions
@@ -194,7 +186,7 @@ distclean-recursive: distclean-multi
maintainer-clean-recursive: maintainer-clean-multi
all-multi:
- $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
+ : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
install-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
mostlyclean-multi:
diff --git a/libffi/Makefile.in b/libffi/Makefile.in
index 17d8d43944b..a2a3a005b88 100644
--- a/libffi/Makefile.in
+++ b/libffi/Makefile.in
@@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995-8, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -80,6 +80,8 @@ TARGET = @TARGET@
TARGETDIR = @TARGETDIR@
VERSION = @VERSION@
libffi_basedir = @libffi_basedir@
+toolexecdir = @toolexecdir@
+toolexeclibdir = @toolexeclibdir@
AUTOMAKE_OPTIONS = cygnus
@@ -95,6 +97,7 @@ EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
src/powerpc/ppc_closure.S src/powerpc/asm.h \
src/powerpc/ffi_darwin.c \
src/powerpc/darwin.S src/powerpc/aix.S \
+ src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
src/arm/ffi.c src/arm/sysv.S
@@ -148,16 +151,13 @@ MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-@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)
toolexeclib_LTLIBRARIES = libffi.la
-noinst_LTLIBRARIES = libfficonvenience.la
+noinst_LTLIBRARIES = libffi_convenience.la
noinst_PROGRAMS = ffitest
-ffitest_SOURCES = src/ffitest.c
+ffitest_OBJECTS = ffitest.lo
ffitest_LDADD = libffi.la
ffitest_LDFLAGS = -shared-libgcc
@@ -170,8 +170,8 @@ TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
-TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S
-TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S
+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
+TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
@@ -189,18 +189,18 @@ libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
@POWERPC_AIX_TRUE@libffi_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
@POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
@ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
-@MIPS_GCC_TRUE@libfficonvenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
-@MIPS_SGI_TRUE@libfficonvenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
-@X86_TRUE@libfficonvenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
-@X86_WIN32_TRUE@libfficonvenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
-@SPARC_TRUE@libfficonvenience_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
-@ALPHA_TRUE@libfficonvenience_la_SOURCES = @ALPHA_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
-@IA64_TRUE@libfficonvenience_la_SOURCES = @IA64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
-@M68K_TRUE@libfficonvenience_la_SOURCES = @M68K_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
-@POWERPC_TRUE@libfficonvenience_la_SOURCES = @POWERPC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
-@POWERPC_AIX_TRUE@libfficonvenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
-@POWERPC_DARWIN_TRUE@libfficonvenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
-@ARM_TRUE@libfficonvenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
+@MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
+@MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
+@X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
+@X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
+@SPARC_TRUE@libffi_convenience_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
+@ALPHA_TRUE@libffi_convenience_la_SOURCES = @ALPHA_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
+@IA64_TRUE@libffi_convenience_la_SOURCES = @IA64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
+@M68K_TRUE@libffi_convenience_la_SOURCES = @M68K_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
+@POWERPC_TRUE@libffi_convenience_la_SOURCES = @POWERPC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
+@POWERPC_AIX_TRUE@libffi_convenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
+@POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
+@ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
AM_CFLAGS = -fexceptions
@@ -218,91 +218,94 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-libfficonvenience_la_LDFLAGS =
-libfficonvenience_la_LIBADD =
-@X86_WIN32_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
-@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
-@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
-@X86_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
-@MIPS_GCC_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
-@MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
-@MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
-@MIPS_GCC_TRUE@src/mips/n32.lo
-@ARM_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
-@POWERPC_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+libffi_convenience_la_LDFLAGS =
+libffi_convenience_la_LIBADD =
+@POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
-@SPARC_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
-@M68K_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
-@ALPHA_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
-@IA64_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
+@ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo
+@IA64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
-@POWERPC_AIX_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+@MIPS_GCC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
+@MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
+@MIPS_GCC_TRUE@src/mips/n32.lo
+@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
+@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
+@M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
+@SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
+@SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \
+@SPARC_TRUE@src/sparc/v9.lo
+@POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
@POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
@POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
-@POWERPC_AIX_TRUE@src/powerpc/aix.lo
-@POWERPC_DARWIN_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo
+@X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
+@ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
+@POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
@POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
@POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
-@POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo
-@MIPS_SGI_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+@POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \
+@POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
+@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
@MIPS_SGI_TRUE@src/mips/n32.lo
libffi_la_LIBADD =
-@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
-@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
-@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
-@X86_TRUE@src/x86/sysv.lo
-@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
-@ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
-@ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \
-@ARM_TRUE@src/arm/ffi.lo
@POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
@POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \
@POWERPC_TRUE@src/powerpc/ppc_closure.lo
-@SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
-@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
-@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
@ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
@IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
+@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
+@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
+@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
+@SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
@POWERPC_AIX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo
+@POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \
+@POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo
+@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
+@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
+@X86_TRUE@src/x86/sysv.lo
+@ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
+@ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \
+@ARM_TRUE@src/arm/ffi.lo
@POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
-@POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo
+@POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \
+@POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
@MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
noinst_PROGRAMS = ffitest$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
-ffitest_OBJECTS = src/ffitest.$(OBJEXT)
ffitest_DEPENDENCIES = libffi.la
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -316,10 +319,10 @@ fficonfig.h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gnutar
+TAR = gtar
GZIP_ENV = --best
-SOURCES = $(libfficonvenience_la_SOURCES) $(libffi_la_SOURCES) $(ffitest_SOURCES)
-OBJECTS = $(libfficonvenience_la_OBJECTS) $(libffi_la_OBJECTS) $(ffitest_OBJECTS)
+SOURCES = $(libffi_convenience_la_SOURCES) $(libffi_la_SOURCES)
+OBJECTS = $(libffi_convenience_la_OBJECTS) $(libffi_la_OBJECTS)
all: all-redirect
.SUFFIXES:
@@ -427,8 +430,8 @@ distclean-libtool:
maintainer-clean-libtool:
-libfficonvenience.la: $(libfficonvenience_la_OBJECTS) $(libfficonvenience_la_DEPENDENCIES)
- $(LINK) $(libfficonvenience_la_LDFLAGS) $(libfficonvenience_la_OBJECTS) $(libfficonvenience_la_LIBADD) $(LIBS)
+libffi_convenience.la: $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_DEPENDENCIES)
+ $(LINK) $(libffi_convenience_la_LDFLAGS) $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_LIBADD) $(LIBS)
libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES)
$(LINK) -rpath $(toolexeclibdir) $(libffi_la_LDFLAGS) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS)
@@ -731,7 +734,7 @@ distclean-recursive: distclean-multi
maintainer-clean-recursive: maintainer-clean-multi
all-multi:
- $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
+ : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
install-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
mostlyclean-multi:
diff --git a/libffi/README b/libffi/README
index e201f9ff755..a00f23daf3a 100644
--- a/libffi/README
+++ b/libffi/README
@@ -52,7 +52,7 @@ Libffi has been ported to:
m68k - Linux (System V ABI)
- PowerPC - Linux (System V ABI)
+ PowerPC - Linux (System V ABI, Darwin, AIX)
ARM - Linux (System V ABI)
@@ -67,7 +67,7 @@ Sun's probably won't either.
If you port libffi to another platform, please let me know! I assume
that some will be easy (x86 NetBSD), and others will be more difficult
-(HP, AIX).
+(HP).
Installing libffi
diff --git a/libffi/configure b/libffi/configure
index 4789f8568cd..049976351b2 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -612,6 +612,12 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
# Check whether --enable-multilib or --disable-multilib was given.
if test "${enable_multilib+set}" = set; then
enableval="$enable_multilib"
@@ -662,7 +668,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:666: checking host system type" >&5
+echo "configure:672: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -753,7 +759,7 @@ else
fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:757: checking build system type" >&5
+echo "configure:763: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -773,7 +779,7 @@ echo "$ac_t""$build" 1>&6
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:777: checking for $ac_word" >&5
+echo "configure:783: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -803,7 +809,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:807: checking for $ac_word" >&5
+echo "configure:813: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -854,7 +860,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:858: checking for $ac_word" >&5
+echo "configure:864: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -886,7 +892,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:896: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -897,12 +903,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 901 "configure"
+#line 907 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -928,12 +934,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:932: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:937: checking whether we are using GNU C" >&5
+echo "configure:943: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -942,7 +948,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -961,7 +967,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:965: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:971: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1004,7 +1010,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1008: checking for ld used by GCC" >&5
+echo "configure:1014: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1034,10 +1040,10 @@ echo "configure:1008: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1038: checking for GNU ld" >&5
+echo "configure:1044: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1041: checking for non-GNU ld" >&5
+echo "configure:1047: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1072,7 +1078,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1076: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1082: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1089,7 +1095,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1093: checking for $LD option to reload object files" >&5
+echo "configure:1099: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1101,7 +1107,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1105: checking for BSD-compatible nm" >&5
+echo "configure:1111: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1139,7 +1145,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1143: checking whether ln -s works" >&5
+echo "configure:1149: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1160,7 +1166,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1164: checking how to recognise dependant libraries" >&5
+echo "configure:1170: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1324,13 +1330,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1328: checking for object suffix" >&5
+echo "configure:1334: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1350,7 +1356,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1354: checking for executable suffix" >&5
+echo "configure:1360: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1360,7 +1366,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
@@ -1393,7 +1399,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1397: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1403: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1455,7 +1461,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1459: checking for file" >&5
+echo "configure:1465: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1526,7 +1532,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1530: checking for $ac_word" >&5
+echo "configure:1536: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1558,7 +1564,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1562: checking for $ac_word" >&5
+echo "configure:1568: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1593,7 +1599,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1597: checking for $ac_word" >&5
+echo "configure:1603: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1625,7 +1631,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1629: checking for $ac_word" >&5
+echo "configure:1635: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1692,8 +1698,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1696 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1702 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
@@ -1714,7 +1720,7 @@ case $host in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1718: checking whether the C compiler needs -belf" >&5
+echo "configure:1724: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1727,14 +1733,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1731 "configure"
+#line 1737 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1862,7 +1868,7 @@ exec 5>>./config.log
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1866: checking for a BSD compatible install" >&5
+echo "configure:1872: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1915,7 +1921,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1919: checking whether build environment is sane" >&5
+echo "configure:1925: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1972,7 +1978,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1976: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1982: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2011,7 +2017,7 @@ fi
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:2015: checking for working aclocal" >&5
+echo "configure:2021: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -2024,7 +2030,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:2028: checking for working autoconf" >&5
+echo "configure:2034: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -2037,7 +2043,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:2041: checking for working automake" >&5
+echo "configure:2047: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -2050,7 +2056,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:2054: checking for working autoheader" >&5
+echo "configure:2060: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -2063,7 +2069,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:2067: checking for working makeinfo" >&5
+echo "configure:2073: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -2080,7 +2086,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2084: checking for executable suffix" >&5
+echo "configure:2090: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2090,7 +2096,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
@@ -2111,7 +2117,7 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2115: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2121: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -2137,7 +2143,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2141: checking for $ac_word" >&5
+echo "configure:2147: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2167,7 +2173,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2171: checking for $ac_word" >&5
+echo "configure:2177: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2218,7 +2224,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2222: checking for $ac_word" >&5
+echo "configure:2228: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2250,7 +2256,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2254: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2261,12 +2267,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2265 "configure"
+#line 2271 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2292,12 +2298,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2296: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2301: checking whether we are using GNU C" >&5
+echo "configure:2307: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2306,7 +2312,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2325,7 +2331,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2329: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2335: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2369,6 +2375,7 @@ i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
+i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;;
i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
@@ -2376,7 +2383,7 @@ sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
-alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; TARGETDIR=alpha;;
+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
@@ -2501,7 +2508,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2505: checking how to run the C preprocessor" >&5
+echo "configure:2512: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2516,13 +2523,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2520 "configure"
+#line 2527 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2533,13 +2540,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2537 "configure"
+#line 2544 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2550,13 +2557,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2554 "configure"
+#line 2561 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2581,12 +2588,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2585: checking for ANSI C header files" >&5
+echo "configure:2592: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2590 "configure"
+#line 2597 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2594,7 +2601,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2611,7 +2618,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2615 "configure"
+#line 2622 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2629,7 +2636,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2633 "configure"
+#line 2640 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2650,7 +2657,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2654 "configure"
+#line 2661 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2661,7 +2668,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2687,12 +2694,12 @@ fi
for ac_func in memcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2691: checking for $ac_func" >&5
+echo "configure:2698: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2696 "configure"
+#line 2703 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2715,7 +2722,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2742,19 +2749,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2746: checking for working alloca.h" >&5
+echo "configure:2753: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2751 "configure"
+#line 2758 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2775,12 +2782,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2779: checking for alloca" >&5
+echo "configure:2786: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2784 "configure"
+#line 2791 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2808,7 +2815,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2840,12 +2847,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2844: checking whether alloca needs Cray hooks" >&5
+echo "configure:2851: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2849 "configure"
+#line 2856 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2870,12 +2877,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2874: checking for $ac_func" >&5
+echo "configure:2881: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2879 "configure"
+#line 2886 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2898,7 +2905,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2925,7 +2932,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2929: checking stack direction for C alloca" >&5
+echo "configure:2936: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2933,7 +2940,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2937 "configure"
+#line 2944 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2952,7 +2959,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2975,13 +2982,13 @@ fi
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2979: checking size of short" >&5
+echo "configure:2986: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 2985 "configure"
+#line 2992 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -2991,7 +2998,7 @@ int main() {
switch (0) case 0: case (sizeof (short) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_short=$ac_size
else
@@ -3014,13 +3021,13 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:3018: checking size of int" >&5
+echo "configure:3025: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 3024 "configure"
+#line 3031 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -3030,7 +3037,7 @@ int main() {
switch (0) case 0: case (sizeof (int) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_int=$ac_size
else
@@ -3053,13 +3060,13 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:3057: checking size of long" >&5
+echo "configure:3064: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 3063 "configure"
+#line 3070 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -3069,7 +3076,7 @@ int main() {
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:3073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
@@ -3092,13 +3099,13 @@ EOF
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:3096: checking size of long long" >&5
+echo "configure:3103: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 3102 "configure"
+#line 3109 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -3108,7 +3115,7 @@ int main() {
switch (0) case 0: case (sizeof (long long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:3112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long_long=$ac_size
else
@@ -3131,13 +3138,13 @@ EOF
echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:3135: checking size of float" >&5
+echo "configure:3142: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 3141 "configure"
+#line 3148 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -3147,7 +3154,7 @@ int main() {
switch (0) case 0: case (sizeof (float) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:3151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_float=$ac_size
else
@@ -3170,13 +3177,13 @@ EOF
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:3174: checking size of double" >&5
+echo "configure:3181: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 3180 "configure"
+#line 3187 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -3186,7 +3193,7 @@ int main() {
switch (0) case 0: case (sizeof (double) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_double=$ac_size
else
@@ -3209,13 +3216,13 @@ EOF
echo $ac_n "checking size of long double""... $ac_c" 1>&6
-echo "configure:3213: checking size of long double" >&5
+echo "configure:3220: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 3219 "configure"
+#line 3226 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -3225,7 +3232,7 @@ int main() {
switch (0) case 0: case (sizeof (long double) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:3229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long_double=$ac_size
else
@@ -3249,13 +3256,13 @@ EOF
echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:3253: checking size of void *" >&5
+echo "configure:3260: checking size of void *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 3259 "configure"
+#line 3266 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -3265,7 +3272,7 @@ int main() {
switch (0) case 0: case (sizeof (void *) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_void_p=$ac_size
else
@@ -3288,14 +3295,14 @@ EOF
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3292: checking whether byte ordering is bigendian" >&5
+echo "configure:3299: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3299 "configure"
+#line 3306 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3306,11 +3313,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3314 "configure"
+#line 3321 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3321,7 +3328,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3341,7 +3348,7 @@ if test "$cross_compiling" = yes; then
echo $ac_n "cross-compiling... " 2>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3345 "configure"
+#line 3352 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3354,7 +3361,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3372,7 +3379,7 @@ fi
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = unknown; then
echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
-echo "configure:3376: checking to probe for byte ordering" >&5
+echo "configure:3383: checking to probe for byte ordering" >&5
cat >conftest.c <<EOF
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
@@ -3420,6 +3427,48 @@ if test $ac_cv_c_bigendian = unknown; then
fi
+if test x$TARGET = xSPARC; then
+ echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
+echo "configure:3433: checking assembler and linker support unaligned pc related relocs" >&5
+if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS -fpic"
+ LDFLAGS="$LDFLAGS -shared"
+ cat > conftest.$ac_ext <<EOF
+#line 3443 "configure"
+#include "confdefs.h"
+asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ libffi_cv_as_sparc_ua_pcrel=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ libffi_cv_as_sparc_ua_pcrel=no
+fi
+rm -f conftest*
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+fi
+
+echo "$ac_t""$libffi_cv_as_sparc_ua_pcrel" 1>&6
+ if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_AS_SPARC_UA_PCREL 1
+EOF
+
+ fi
+fi
+
@@ -3473,15 +3522,17 @@ EOF
fi
-
-
-if test -z "$with_cross_host"; then
- USE_LIBDIR_TRUE=
- USE_LIBDIR_FALSE='#'
+if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
else
- USE_LIBDIR_TRUE='#'
- USE_LIBDIR_FALSE=
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
fi
+toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory`
+
+
if test "${multilib}" = "yes"; then
multilib_arg="--enable-multilib"
@@ -3682,8 +3733,8 @@ s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@TARGET@%$TARGET%g
s%@TARGETDIR@%$TARGETDIR%g
-s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
-s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
+s%@toolexecdir@%$toolexecdir%g
+s%@toolexeclibdir@%$toolexeclibdir%g
CEOF
EOF
@@ -3917,6 +3968,7 @@ cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
+ LD="${ORIGINAL_LD_FOR_MULTILIBS}"
ac_file=Makefile . ${libffi_basedir}/../config-ml.in
fi
diff --git a/libffi/configure.in b/libffi/configure.in
index d0f26175afe..e8ee826724a 100644
--- a/libffi/configure.in
+++ b/libffi/configure.in
@@ -2,6 +2,12 @@ dnl Process this with autoconf to create configure
AC_INIT(fficonfig.h.in)
AM_CONFIG_HEADER(fficonfig.h)
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
dnl Default to --enable-multilib
AC_ARG_ENABLE(multilib,
[ --enable-multilib build many library versions (default)],
@@ -44,6 +50,7 @@ i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
+i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;;
i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
@@ -51,7 +58,7 @@ sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
-alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; TARGETDIR=alpha;;
+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
@@ -95,6 +102,24 @@ AC_COMPILE_CHECK_SIZEOF(long double)
AC_COMPILE_CHECK_SIZEOF(void *)
AC_C_BIGENDIAN_CROSS
+if test x$TARGET = xSPARC; then
+ AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],
+ libffi_cv_as_sparc_ua_pcrel, [
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS -fpic"
+ LDFLAGS="$LDFLAGS -shared"
+ AC_TRY_LINK([asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");],,
+ [libffi_cv_as_sparc_ua_pcrel=yes],
+ [libffi_cv_as_sparc_ua_pcrel=no])
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"])
+ if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then
+ AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1,
+ [Define if your assembler and linker support unaligned PC relative relocs.])
+ fi
+fi
+
AC_SUBST(TARGET)
AC_SUBST(TARGETDIR)
@@ -124,7 +149,17 @@ AC_ARG_ENABLE(purify-safety,
AC_DEFINE(USING_PURIFY)
fi)
-AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
+if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
+else
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
+fi
+toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory`
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
if test "${multilib}" = "yes"; then
multilib_arg="--enable-multilib"
@@ -135,6 +170,7 @@ fi
AC_OUTPUT(include/Makefile include/ffi.h Makefile,
[
if test -n "$CONFIG_FILES"; then
+ LD="${ORIGINAL_LD_FOR_MULTILIBS}"
ac_file=Makefile . ${libffi_basedir}/../config-ml.in
fi
],
diff --git a/libffi/fficonfig.h.in b/libffi/fficonfig.h.in
index f7ea90bbdf9..ac15aeddbd7 100644
--- a/libffi/fficonfig.h.in
+++ b/libffi/fficonfig.h.in
@@ -68,3 +68,6 @@
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
+
+/* Define if your assembler and linker support unaligned PC relative relocs. */
+#undef HAVE_AS_SPARC_UA_PCREL
diff --git a/libffi/include/ffi.h.in b/libffi/include/ffi.h.in
index 90ed2692305..8097917fe10 100644
--- a/libffi/include/ffi.h.in
+++ b/libffi/include/ffi.h.in
@@ -412,6 +412,18 @@ struct ffi_ia64_trampoline_struct {
#define FFI_TRAMPOLINE_SIZE 40
#define FFI_NATIVE_RAW_API 0
+#elif defined(POWERPC_DARWIN)
+
+#define FFI_CLOSURES 1
+#define FFI_TRAMPOLINE_SIZE 40
+#define FFI_NATIVE_RAW_API 0
+
+#elif defined(POWERPC_AIX)
+
+#define FFI_CLOSURES 1
+#define FFI_TRAMPOLINE_SIZE 24 /* see struct below */
+#define FFI_NATIVE_RAW_API 0
+
#else
#define FFI_CLOSURES 0
@@ -419,6 +431,16 @@ struct ffi_ia64_trampoline_struct {
#endif
+#if defined(POWERPC_DARWIN) || defined(POWERPC_AIX)
+
+struct ffi_aix_trampoline_struct {
+ void * code_pointer; /* Pointer to ffi_closure_ASM */
+ void * toc; /* TOC */
+ void * static_chain; /* Pointer to closure */
+};
+
+#endif
+
#if FFI_CLOSURES
diff --git a/libffi/src/ia64/ffi.c b/libffi/src/ia64/ffi.c
index 4da6dd361d0..4338d34c4b0 100644
--- a/libffi/src/ia64/ffi.c
+++ b/libffi/src/ia64/ffi.c
@@ -35,7 +35,7 @@
/* type long enough to hold an entire register. For now we use double. */
typedef double float80;
-/* The stack layout at call to ffi_prep_regs. Other_args will remain */
+/* The stack layout at call to ffi_prep_args. Other_args will remain */
/* on the stack for the actual call. Everything else we be transferred */
/* to registers and popped by the assembly code. */
@@ -123,7 +123,8 @@ static bool is_homogeneous_fp_aggregate(ffi_type * type, int n,
}
/* ffi_prep_args is called by the assembly routine once stack space
- has been allocated for the function's arguments. Returns nonzero
+ has been allocated for the function's arguments. It fills in
+ the arguments in the structure referenced by stack. Returns nonzero
if fp registers are used for arguments. */
static bool
@@ -463,7 +464,7 @@ ffi_prep_incoming_args_UNIX(struct ia64_args *args, void **rvalue,
*/
/* ffi_closure_UNIX is an assembly routine, which copies the register */
-/* state into s struct ia64_args, and the invokes */
+/* state into a struct ia64_args, and then invokes */
/* ffi_closure_UNIX_inner. It also recovers the closure pointer */
/* from its fake gp pointer. */
void ffi_closure_UNIX();
@@ -473,7 +474,7 @@ void ffi_closure_UNIX();
#endif
void
ffi_closure_UNIX_inner (ffi_closure *closure, struct ia64_args * args)
-/* Hopefully declarint this as a varargs function will force all args */
+/* Hopefully declaring this as a varargs function will force all args */
/* to memory. */
{
// this is our return value storage
diff --git a/libffi/src/ia64/unix.S b/libffi/src/ia64/unix.S
index c0ca516be7f..e599268c721 100644
--- a/libffi/src/ia64/unix.S
+++ b/libffi/src/ia64/unix.S
@@ -42,13 +42,24 @@
#define FLOAT_SZ 8 /* in-memory size of fp operands */
+/* Allocate an ia64_args structure on the stack; call ffi_prep_args */
+/* to fill it in with argument values; copy those to the real */
+/* registers, leaving overflow arguments on the stack. Then call fn */
+/* and move the result from registers into *raddr. */
+ .pred.safe_across_calls p1-p5,p16-p63
.text
.align 16
- .global ffi_call_unix#
- .proc ffi_call_unix#
+ .global ffi_call_unix
+ .proc ffi_call_unix
ffi_call_unix:
- alloc loc0=ar.pfs,6,5,8,0
+ .prologue
+ .save ar.pfs,r38 /* loc0 */
+ alloc loc0=ar.pfs,6,6,8,0
+ .save rp,loc1
mov loc1=b0;
+ .vframe loc5
+ mov loc5=sp;
+ .body
sub sp=sp,bytes
mov loc4=r1 /* Save gp */
ld8 r8=[callback],8 /* code address of callback */
@@ -104,7 +115,7 @@ fp_done:
;;
ld8 r1=[fn] /* Set up gp */
mov b6=r8;;
- br.call.sptk.many b0 = b6 /* call ffi_prep_args */
+ br.call.sptk.many b0 = b6 /* call fn */
/* Handle return value. */
cmp.eq p6,p0=0,raddr
@@ -126,6 +137,7 @@ fp_done:
(p8) stfs [raddr]=f8
(p9) stfd [raddr]=f8
;;
+ .label_state 1
(p6) br.cond.dpnt.few handle_float_hfa
(p7) br.cond.dpnt.few handle_double_hfa
br done
@@ -151,9 +163,13 @@ done:
mov r1=loc4 /* Restore gp */
mov ar.pfs = loc0
mov b0 = loc1
+ .restore sp
+ mov sp = loc5
br.ret.sptk.many b0
handle_double_hfa:
+ .body
+ .copy_state 1
/* Homogeneous floating point array of doubles is returned in */
/* registers f8-f15. Save one at a time to return area. */
and flags=0xf,flags /* Retrieve size */
@@ -242,13 +258,19 @@ shfa2: add loc3=1*4,raddr
.endp ffi_call_unix
+ .pred.safe_across_calls p1-p5,p16-p63
.text
.align 16
.global ffi_closure_UNIX
.proc ffi_closure_UNIX
ffi_closure_UNIX:
- alloc loc0=ar.pfs,8,2,2,0
+ .prologue
+ .save ar.pfs,r40 /* loc0 */
+ alloc loc0=ar.pfs,8,3,2,0
+ .save rp,loc1
mov loc1=b0
+ .vframe loc2
+ mov loc2=sp
/* Retrieve closure pointer and real gp. */
mov out0=gp
add gp=16,gp
@@ -295,7 +317,8 @@ ffi_closure_UNIX:
;;
mov b0=loc1
mov ar.pfs=loc0
- add sp=BASIC_ARGS_SZ,sp
+ .restore sp
+ mov sp=loc2
br.ret.sptk.many b0
.endp ffi_closure_UNIX
diff --git a/libffi/src/java_raw_api.c b/libffi/src/java_raw_api.c
index 5f85582cfde..55c3d132d53 100644
--- a/libffi/src/java_raw_api.c
+++ b/libffi/src/java_raw_api.c
@@ -52,6 +52,7 @@ ffi_java_raw_size (ffi_cif *cif)
switch((*at) -> type) {
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
+ case FFI_TYPE_DOUBLE:
result += 2 * SIZEOF_ARG;
break;
case FFI_TYPE_STRUCT:
diff --git a/libffi/src/mips/n32.s b/libffi/src/mips/n32.s
deleted file mode 100644
index 007f0a825b0..00000000000
--- a/libffi/src/mips/n32.s
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "n32.S"
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/libffi/src/mips/o32.s b/libffi/src/mips/o32.s
deleted file mode 100644
index ff505a1ede1..00000000000
--- a/libffi/src/mips/o32.s
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "o32.S"
-
diff --git a/libffi/src/powerpc/aix_closure.S b/libffi/src/powerpc/aix_closure.S
new file mode 100644
index 00000000000..7fa96f1fc95
--- /dev/null
+++ b/libffi/src/powerpc/aix_closure.S
@@ -0,0 +1,251 @@
+/* -----------------------------------------------------------------------
+ aix_closures.S - Copyright (c) 2002 Free Software Foundation, Inc.
+ based on darwin_closures.S
+
+ PowerPC Assembly glue.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ ``Software''), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ ----------------------------------------------------------------------- */
+
+ .set r0,0
+ .set r1,1
+ .set r2,2
+ .set r3,3
+ .set r4,4
+ .set r5,5
+ .set r6,6
+ .set r7,7
+ .set r8,8
+ .set r9,9
+ .set r10,10
+ .set r11,11
+ .set r12,12
+ .set r13,13
+ .set r14,14
+ .set r15,15
+ .set r16,16
+ .set r17,17
+ .set r18,18
+ .set r19,19
+ .set r20,20
+ .set r21,21
+ .set r22,22
+ .set r23,23
+ .set r24,24
+ .set r25,25
+ .set r26,26
+ .set r27,27
+ .set r28,28
+ .set r29,29
+ .set r30,30
+ .set r31,31
+ .set f0,0
+ .set f1,1
+ .set f2,2
+ .set f3,3
+ .set f4,4
+ .set f5,5
+ .set f6,6
+ .set f7,7
+ .set f8,8
+ .set f9,9
+ .set f10,10
+ .set f11,11
+ .set f12,12
+ .set f13,13
+ .set f14,14
+ .set f15,15
+ .set f16,16
+ .set f17,17
+ .set f18,18
+ .set f19,19
+ .set f20,20
+ .set f21,21
+
+#define LIBFFI_ASM
+#define JUMPTARGET(name) name
+#define L(x) x
+ .file "aix_closure.S"
+ .toc
+LC..60:
+ .tc L..60[TC],L..60
+ .csect .text[PR]
+ .align 2
+
+.csect .text[PR]
+ .align 2
+ .globl ffi_closure_ASM
+ .globl .ffi_closure_ASM
+.csect ffi_closure_ASM[DS]
+
+ffi_closure_ASM:
+ .long .ffi_closure_ASM, TOC[tc0], 0
+ .csect .text[PR]
+.ffi_closure_ASM:
+
+ mflr r0 /* extract return address */
+ stw r0, 8(r1) /* save the return address */
+
+ /* 24 Bytes (Linkage Area) */
+ /* 32 Bytes (params) */
+ /* 104 Bytes (13*8 from FPR) */
+ /* 4 Bytes (result)
+ /* 164 Bytes */
+
+ stwu r1,-164(r1) /* skip over caller save area */
+
+/* we want to build up an area for the parameters passed */
+/* in registers (both floating point and integer) */
+
+ /* we store gpr 3 to gpr 10 (aligned to 4) */
+ /* in the parents outgoing area */
+ stw r3, 188(r1)
+ stw r4, 192(r1)
+ stw r5, 196(r1)
+ stw r6, 200(r1)
+ stw r7, 204(r1)
+ stw r8, 208(r1)
+ stw r9, 212(r1)
+ stw r10, 216(r1)
+
+ /* next save fpr 1 to fpr 13 (aligned to 8) */
+ stfd f1, 56(r1)
+ stfd f2, 64(r1)
+ stfd f3, 72(r1)
+ stfd f4, 80(r1)
+ stfd f5, 88(r1)
+ stfd f6, 96(r1)
+ stfd f7, 104(r1)
+ stfd f8, 112(r1)
+ stfd f9, 120(r1)
+ stfd f10, 128(r1)
+ stfd f11, 136(r1)
+ stfd f12, 144(r1)
+ stfd f13, 152(r1)
+
+ /* set up registers for the routine that actually does the work */
+ /* get the context pointer from the trampoline */
+ mr r3,r11
+
+ /* now load up the pointer to the result storage */
+ addi r4,r1,160
+
+ /* now load up the pointer to the saved gpr registers */
+ addi r5,r1,188
+
+ /* now load up the pointer to the saved fpr registers */
+ addi r6,r1,56
+
+ /* now load up the pointer to the outgoing parameter */
+ /* stack in the previous frame */
+ addi r7,r1,220
+
+ /* make the call */
+ bl .ffi_closure_helper_DARWIN
+ nop
+
+ /* now r3 contains the return type */
+ /* so use it to look up in a table */
+ /* so we know how to deal with each type */
+
+ /* look up the proper starting point in table */
+ /* by using return type as offset */
+ addi r5,r1,160 /* get pointer to results area */
+ lwz r4,LC..60(2) /* get address of jump table */
+ slwi r3,r3,2 /* now multiply return type by 4 */
+ lwzx r3,r4,r3 /* get the contents of that table value */
+ add r3,r3,r4 /* add contents of table to table address */
+ mtctr r3
+ bctr /* jump to it */
+
+L..60:
+ .long L..44-L..60 /* FFI_TYPE_VOID */
+ .long L..50-L..60 /* FFI_TYPE_INT */
+ .long L..47-L..60 /* FFI_TYPE_FLOAT */
+ .long L..46-L..60 /* FFI_TYPE_DOUBLE */
+ .long L..46-L..60 /* FFI_TYPE_LONGDOUBLE */
+ .long L..56-L..60 /* FFI_TYPE_UINT8 */
+ .long L..55-L..60 /* FFI_TYPE_SINT8 */
+ .long L..58-L..60 /* FFI_TYPE_UINT16 */
+ .long L..57-L..60 /* FFI_TYPE_SINT16 */
+ .long L..50-L..60 /* FFI_TYPE_UINT32 */
+ .long L..50-L..60 /* FFI_TYPE_SINT32 */
+ .long L..48-L..60 /* FFI_TYPE_UINT64 */
+ .long L..48-L..60 /* FFI_TYPE_SINT64 */
+ .long L..44-L..60 /* FFI_TYPE_STRUCT */
+ .long L..50-L..60 /* FFI_TYPE_POINTER */
+
+
+/* case double */
+L..46:
+ lfd f1,0(r5)
+ b L..44
+
+/* case float */
+L..47:
+ lfs f1,0(r5)
+ b L..44
+
+/* case long long */
+L..48:
+ lwz r3,0(r5)
+ lwz r4,4(r5)
+ b L..44
+
+/* case default / int32 / pointer */
+L..50:
+ lwz r3,0(r5)
+ b L..44
+
+/* case signed int8 */
+L..55:
+ addi r5,r5,3
+ lbz r3,0(r5)
+ slwi r3,r3,24
+ srawi r3,r3,24
+ b L..44
+
+/* case unsigned int8 */
+L..56:
+ addi r5,r5,3
+ lbz r3,0(r5)
+ b L..44
+
+/* case signed int16 */
+L..57:
+ addi r5,r5,2
+ lhz r3,0(r5)
+ extsh r3,r3
+ b L..44
+
+/* case unsigned int16 */
+L..58:
+ addi r5,r5,2
+ lhz r3,0(r5)
+
+/* case void / done */
+L..44:
+
+ addi r1,r1,164 /* restore stack pointer */
+ lwz r0,8(r1) /* get return address */
+ mtlr r0 /* reset link register */
+ blr
+
+/* END(ffi_closure_ASM) */
diff --git a/libffi/src/powerpc/darwin_closure.S b/libffi/src/powerpc/darwin_closure.S
new file mode 100644
index 00000000000..9e54d2231b9
--- /dev/null
+++ b/libffi/src/powerpc/darwin_closure.S
@@ -0,0 +1,189 @@
+/* -----------------------------------------------------------------------
+ darwin_closures.S - Copyright (c) 2002 Free Software Foundation, Inc.
+ based on ppc_closures.S
+
+ PowerPC Assembly glue.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ ``Software''), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ ----------------------------------------------------------------------- */
+
+#define LIBFFI_ASM
+#define JUMPTARGET(name) name
+#define L(x) x
+.text
+.globl _ffi_closure_helper_DARWIN
+
+.text
+ .align 2
+.globl _ffi_closure_ASM
+
+.text
+ .align 2
+_ffi_closure_ASM:
+
+ mflr r0 /* extract return address */
+ stw r0, 8(r1) /* save the return address */
+
+ /* 24 Bytes (Linkage Area) */
+ /* 32 Bytes (outgoing parameter area, always reserved) */
+ /* 104 Bytes (13*8 from FPR) */
+ /* 4 Bytes (result)
+ /* 164 Bytes */
+
+ stwu r1,-164(r1) /* skip over caller save area */
+
+/* we want to build up an area for the parameters passed */
+/* in registers (both floating point and integer) */
+
+ /* we store gpr 3 to gpr 10 (aligned to 4) */
+ /* in the parents outgoing area */
+ stw r3, 188(r1)
+ stw r4, 192(r1)
+ stw r5, 196(r1)
+ stw r6, 200(r1)
+ stw r7, 204(r1)
+ stw r8, 208(r1)
+ stw r9, 212(r1)
+ stw r10, 216(r1)
+
+ /* we save fpr 1 to fpr 13 (aligned to 8) */
+ stfd f1, 56(r1)
+ stfd f2, 64(r1)
+ stfd f3, 72(r1)
+ stfd f4, 80(r1)
+ stfd f5, 88(r1)
+ stfd f6, 96(r1)
+ stfd f7, 104(r1)
+ stfd f8, 112(r1)
+ stfd f9, 120(r1)
+ stfd f10, 128(r1)
+ stfd f11, 136(r1)
+ stfd f12, 144(r1)
+ stfd f13, 152(r1)
+
+ /* set up registers for the routine that actually does the work */
+ /* get the context pointer from the trampoline */
+ mr r3,r11
+
+ /* now load up the pointer to the result storage */
+ addi r4,r1,160
+
+ /* now load up the pointer to the saved gpr registers */
+ addi r5,r1,188
+
+ /* now load up the pointer to the saved fpr registers */
+ addi r6,r1,56
+
+ /* now load up the pointer to the outgoing parameter */
+ /* stack in the previous frame */
+ addi r7,r1,220
+
+ /* make the call */
+ bl L(_ffi_closure_helper_DARWIN)
+
+ /* now r3 contains the return type */
+ /* so use it to look up in a table */
+ /* so we know how to deal with each type */
+
+ /* look up the proper starting point in table */
+ /* by using return type as offset */
+ addi r5,r1,160 /* get pointer to results area */
+ addis r4,0,ha16(.L60) /* get address of jump table */
+ addi r4,r4,lo16(.L60)
+ slwi r3,r3,2 /* now multiply return type by 4 */
+ lwzx r3,r4,r3 /* get the contents of that table value */
+ add r3,r3,r4 /* add contents of table to table address */
+ mtctr r3
+ bctr /* jump to it */
+
+.L60:
+ .long .L44-.L60 /* FFI_TYPE_VOID */
+ .long .L50-.L60 /* FFI_TYPE_INT */
+ .long .L47-.L60 /* FFI_TYPE_FLOAT */
+ .long .L46-.L60 /* FFI_TYPE_DOUBLE */
+ .long .L46-.L60 /* FFI_TYPE_LONGDOUBLE */
+ .long .L56-.L60 /* FFI_TYPE_UINT8 */
+ .long .L55-.L60 /* FFI_TYPE_SINT8 */
+ .long .L58-.L60 /* FFI_TYPE_UINT16 */
+ .long .L57-.L60 /* FFI_TYPE_SINT16 */
+ .long .L50-.L60 /* FFI_TYPE_UINT32 */
+ .long .L50-.L60 /* FFI_TYPE_SINT32 */
+ .long .L48-.L60 /* FFI_TYPE_UINT64 */
+ .long .L48-.L60 /* FFI_TYPE_SINT64 */
+ .long .L44-.L60 /* FFI_TYPE_STRUCT */
+ .long .L50-.L60 /* FFI_TYPE_POINTER */
+
+
+/* case double */
+.L46:
+ lfd f1,0(r5)
+ b .L44
+
+/* case float */
+.L47:
+ lfs f1,0(r5)
+ b .L44
+
+/* case long long */
+.L48:
+ lwz r3,0(r5)
+ lwz r4,4(r5)
+ b .L44
+
+/* case default / int32 / pointer */
+.L50:
+ lwz r3,0(r5)
+ b .L44
+
+/* case signed int8 */
+.L55:
+ addi r5,r5,3
+ lbz r3,0(r5)
+ extsb r3,r3
+ b .L44
+
+/* case unsigned int8 */
+.L56:
+ addi r5,r5,3
+ lbz r3,0(r5)
+ b .L44
+
+/* case signed int16 */
+.L57:
+ addi r5,r5,2
+ lhz r3,0(r5)
+ extsh r3,r3
+ b .L44
+
+/* case unsigned int16 */
+.L58:
+ addi r5,r5,2
+ lhz r3,0(r5)
+
+/* case void / done */
+.L44:
+
+ addi r1,r1,164 /* restore stack pointer */
+ lwz r0,8(r1) /* get return address */
+ mtlr r0 /* reset link register */
+ blr
+
+/* END(ffi_closure_ASM) */
+
diff --git a/libffi/src/powerpc/ffi_darwin.c b/libffi/src/powerpc/ffi_darwin.c
index 3cf504cf150..36d83b92a60 100644
--- a/libffi/src/powerpc/ffi_darwin.c
+++ b/libffi/src/powerpc/ffi_darwin.c
@@ -6,7 +6,7 @@
Darwin ABI support (c) 2001 John Hornkvist
AIX ABI support (c) 2002 Free Software Foundation, Inc.
- $Id: ffi_darwin.c,v 1.2 2002/01/17 16:04:21 dje Exp $
+ $Id: ffi_darwin.c,v 1.4 2002/03/07 18:24:42 dje Exp $
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -31,6 +31,8 @@
#include <ffi_common.h>
#include <stdlib.h>
+
+extern void ffi_closure_ASM(void);
enum {
/* The assembly depends on these exact flags. */
@@ -382,3 +384,328 @@ void ffi_call(/*@dependent@*/ ffi_cif *cif,
break;
}
}
+
+static void flush_icache(char *);
+static void flush_range(char *, int);
+
+/* The layout of a function descriptor. A C function pointer really */
+/* points to one of these. */
+
+typedef struct aix_fd_struct {
+ void *code_pointer;
+ void *toc;
+} aix_fd;
+
+/* here I'd like to add the stack frame layout we use in darwin_closure.S
+ * and aix_clsoure.S
+ *
+/* SP previous -> +---------------------------------------+ <--- child frame
+ | back chain to caller 4 |
+ +---------------------------------------+ 4
+ | saved CR 4 |
+ +---------------------------------------+ 8
+ | saved LR 4 |
+ +---------------------------------------+ 12
+ | reserved for compilers 4 |
+ +---------------------------------------+ 16
+ | reserved for binders 4 |
+ +---------------------------------------+ 20
+ | saved TOC pointer 4 |
+ +---------------------------------------+ 24
+ | always reserved 8*4=32 (revious GPRs)|
+ | according to the linkage convention |
+ | from AIX |
+ +---------------------------------------+ 56
+ | our FPR area 13*8=104 |
+ | f1 |
+ | . |
+ | f13 |
+ +---------------------------------------+ 160
+ | result area 4 |
+SP current --> +---------------------------------------+ 164 <- parent frame
+ | back chain to caller 4 |
+ +---------------------------------------+ 168
+ | saved CR 4 |
+ +---------------------------------------+ 172
+ | saved LR 4 |
+ +---------------------------------------+ 176
+ | reserved for compilers 4 |
+ +---------------------------------------+ 180
+ | reserved for binders 4 |
+ +---------------------------------------+ 184
+ | saved TOC pointer 4 |
+ +---------------------------------------+ 188
+ | always reserved 8*4=32 we store our |
+ | GPRs here |
+ | r3 |
+ | . |
+ | r10 |
+ +---------------------------------------+ 220
+ | PST area, overflow part |
+ +---------------------------------------+ xxx
+ | ???? |
+ +---------------------------------------+ xxx
+
+*/
+ffi_status
+ffi_prep_closure (ffi_closure* closure,
+ ffi_cif* cif,
+ void (*fun)(ffi_cif*, void*, void**, void*),
+ void *user_data)
+{
+ unsigned int *tramp;
+ struct ffi_aix_trampoline_struct *tramp_aix;
+
+ switch (cif->abi)
+ {
+ case FFI_DARWIN:
+
+ FFI_ASSERT (cif->abi == FFI_DARWIN);
+
+ tramp = (unsigned int *) &closure->tramp[0];
+ tramp[0] = 0x7c0802a6; /* mflr r0 */
+ tramp[1] = 0x4800000d; /* bl 10 <trampoline_initial+0x10> */
+ tramp[4] = 0x7d6802a6; /* mflr r11 */
+ tramp[5] = 0x818b0000; /* lwz r12,0(r11) /* function address */
+ tramp[6] = 0x7c0803a6; /* mtlr r0 */
+ tramp[7] = 0x7d8903a6; /* mtctr r12 */
+ tramp[8] = 0x816b0004; /* lwz r11,4(r11) /* static chain */
+ tramp[9] = 0x4e800420; /* bctr */
+ *(void **) &tramp[2] = (void *)ffi_closure_ASM; /* function */
+ *(void **) &tramp[3] = (void *)closure; /* context */
+
+ closure->cif = cif;
+ closure->fun = fun;
+ closure->user_data = user_data;
+
+ /* Flush the icache. Only necessary on Darwin */
+ flush_range(&closure->tramp[0],FFI_TRAMPOLINE_SIZE);
+
+ break;
+
+ case FFI_AIX:
+
+ tramp_aix = (struct ffi_aix_trampoline_struct *) (closure->tramp);
+ aix_fd *fd = (aix_fd *)(void *)ffi_closure_ASM;
+
+ FFI_ASSERT (cif->abi == FFI_AIX);
+
+ tramp_aix->code_pointer = fd->code_pointer;
+ tramp_aix->toc = fd->toc;
+ tramp_aix->static_chain = closure;
+ closure->cif = cif;
+ closure->fun = fun;
+ closure->user_data = user_data;
+
+ default:
+
+ FFI_ASSERT(0);
+ break;
+ }
+ return FFI_OK;
+}
+
+static void
+flush_icache(char *addr)
+{
+#ifndef _AIX
+ __asm__ volatile (
+ "dcbf 0,%0;"
+ "sync;"
+ "icbi 0,%0;"
+ "sync;"
+ "isync;"
+ : : "r"(addr) : "memory");
+#endif
+}
+
+static void
+flush_range(char * addr1, int size)
+{
+#define MIN_LINE_SIZE 32
+ int i;
+ for (i = 0; i < size; i += MIN_LINE_SIZE)
+ flush_icache(addr1+i);
+ flush_icache(addr1+size-1);
+}
+
+int ffi_closure_helper_DARWIN (ffi_closure*, void*, unsigned long*,
+ unsigned long*, unsigned long*);
+
+/* Basically the trampoline invokes ffi_closure_ASM, and on
+ * entry, r11 holds the address of the closure.
+ * After storing the registers that could possibly contain
+ * parameters to be passed into the stack frame and setting
+ * up space for a return value, ffi_closure_ASM invokes the
+ * following helper function to do most of the work
+ */
+
+int
+ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
+ unsigned long * pgr, unsigned long * pfr,
+ unsigned long * pst)
+{
+ /* rvalue is the pointer to space for return value in closure assembly */
+ /* pgr is the pointer to where r3-r10 are stored in ffi_closure_ASM */
+ /* pfr is the pointer to where f1-f13 are stored in ffi_closure_ASM */
+ /* pst is the pointer to outgoing parameter stack in original caller */
+
+ void ** avalue;
+ ffi_type ** arg_types;
+ long i, avn;
+ long nf; /* number of floating registers already used */
+ long ng; /* number of general registers already used */
+ ffi_cif * cif;
+ double temp;
+
+ cif = closure->cif;
+ avalue = alloca(cif->nargs * sizeof(void *));
+
+ nf = 0;
+ ng = 0;
+
+ /* Copy the caller's structure return value address so that the closure
+ returns the data directly to the caller. */
+ if (cif->rtype->type == FFI_TYPE_STRUCT)
+ {
+ rvalue = (void *)pgr;
+ ng++;
+ pgr++;
+ }
+
+ i = 0;
+ avn = cif->nargs;
+ arg_types = cif->arg_types;
+
+ /* Grab the addresses of the arguments from the stack frame. */
+ while (i < avn)
+ {
+ switch (arg_types[i]->type)
+ {
+ case FFI_TYPE_SINT8:
+ case FFI_TYPE_UINT8:
+ /* there are 8 gpr registers used to pass values */
+ if (ng < 8) {
+ avalue[i] = (((char *)pgr)+3);
+ ng++;
+ pgr++;
+ } else {
+ avalue[i] = (((char *)pst)+3);
+ pst++;
+ }
+ break;
+
+ case FFI_TYPE_SINT16:
+ case FFI_TYPE_UINT16:
+ /* there are 8 gpr registers used to pass values */
+ if (ng < 8) {
+ avalue[i] = (((char *)pgr)+2);
+ ng++;
+ pgr++;
+ } else {
+ avalue[i] = (((char *)pst)+2);
+ pst++;
+ }
+ break;
+
+ case FFI_TYPE_SINT32:
+ case FFI_TYPE_UINT32:
+ case FFI_TYPE_POINTER:
+ case FFI_TYPE_STRUCT:
+ /* there are 8 gpr registers used to pass values */
+ if (ng < 8) {
+ avalue[i] = pgr;
+ ng++;
+ pgr++;
+ } else {
+ avalue[i] = pst;
+ pst++;
+ }
+ break;
+
+ case FFI_TYPE_SINT64:
+ case FFI_TYPE_UINT64:
+ /* long long ints are passed in two gpr's if available or in
+ * the pst, one place is a bit odd, when a long long passes
+ * the boundary between gpr and pst area we have to increment
+ * the pst by one.
+ */
+ if (ng < 7) {
+ avalue[i] = pgr;
+ ng+=2;
+ pgr+=2;
+ } else if (ng == 7) {
+ avalue[i] = pgr;
+ ng++;
+ pgr++;
+ pst++;
+ } else {
+ avalue[i] = pst;
+ pst+=2;
+ }
+ break;
+
+ case FFI_TYPE_FLOAT:
+ /* a float value consumes a GPR
+ *
+ * there are 13 64bit floating point registers
+ */
+
+ if ((ng > 7) && (nf < 13)) {
+ pst++;
+ }
+ if (nf < 13) {
+ temp = *(double*)pfr;
+ *(float*)pfr = (float)temp;
+ avalue[i] = pfr;
+ nf++;
+ pfr+=2;
+ ng++;
+ pgr++;
+
+ } else {
+ avalue[i] = pst;
+ nf++;
+ pst++;
+ }
+ break;
+
+ case FFI_TYPE_DOUBLE:
+ /* a double value consumes two GPRs
+ *
+ * there are 13 64bit floating point registers
+ */
+
+ if ((ng == 7) && (nf < 13)) {
+ pst++; /* if only one gpr is left the double steals it */
+ } else if ((ng > 7) && (nf < 13)) {
+ pst+=2; /* a double consumes two GPRs in Darwin/AIX */
+ }
+ if (nf < 13) {
+ avalue[i] = pfr;
+ nf++;
+ pfr+=2;
+ ng+=2;
+ pgr+=2;
+
+ } else {
+ avalue[i] = pst;
+ nf++;
+ pst+=2;
+ }
+ break;
+
+ default:
+ FFI_ASSERT(0);
+
+ }
+
+ i++;
+ }
+
+ (closure->fun) (cif, rvalue, avalue, closure->user_data);
+
+ /* Tell ffi_closure_ASM to perform return type promotions. */
+ return cif->rtype->type;
+
+}
diff --git a/libffi/src/powerpc/ppc_closure.S b/libffi/src/powerpc/ppc_closure.S
index a9ea9c7ee52..e402fb5cda3 100644
--- a/libffi/src/powerpc/ppc_closure.S
+++ b/libffi/src/powerpc/ppc_closure.S
@@ -1,14 +1,13 @@
#define LIBFFI_ASM
#include <powerpc/asm.h>
-.globl ffi_closure_helper_SYSV
+ .file "ppc_closure.S"
ENTRY(ffi_closure_SYSV)
.LFB1:
stwu %r1,-144(%r1)
.LCFI0:
mflr %r0
- stw %r31,140(%r1)
.LCFI1:
stw %r0,148(%r1)
@@ -63,87 +62,136 @@ ENTRY(ffi_closure_SYSV)
# look up the proper starting point in table
# by using return type as offset
addi %r5,%r1,112 # get pointer to results area
- addis %r4,0,.L60@ha # get address of jump table
- addi %r4,%r4,.L60@l
- slwi %r3,%r3,2 # now multiply return type by 4
- lwzx %r3,%r4,%r3 # get the contents of that table value
- add %r3,%r3,%r4 # add contents of table to table address
+ bl .Lget_ret_type0_addr # get pointer to .Lret_type0 into LR
+ mflr %r4 # move to r4
+ slwi %r3,%r3,4 # now multiply return type by 16
+ add %r3,%r3,%r4 # add contents of table to table address
mtctr %r3
bctr # jump to it
.LFE1:
- .align 2
-.L60:
- .long .L44-.L60 # FFI_TYPE_VOID
- .long .L50-.L60 # FFI_TYPE_INT
- .long .L47-.L60 # FFI_TYPE_FLOAT
- .long .L46-.L60 # FFI_TYPE_DOUBLE
- .long .L46-.L60 # FFI_TYPE_LONGDOUBLE
- .long .L56-.L60 # FFI_TYPE_UINT8
- .long .L55-.L60 # FFI_TYPE_SINT8
- .long .L58-.L60 # FFI_TYPE_UINT16
- .long .L57-.L60 # FFI_TYPE_SINT16
- .long .L50-.L60 # FFI_TYPE_UINT32
- .long .L50-.L60 # FFI_TYPE_SINT32
- .long .L48-.L60 # FFI_TYPE_UINT64
- .long .L48-.L60 # FFI_TYPE_SINT64
- .long .L44-.L60 # FFI_TYPE_STRUCT
- .long .L50-.L60 # FFI_TYPE_POINTER
-
-
-# case double
-.L46:
- lfd %f1,0(%r5)
- b .L44
-# case float
-.L47:
+# Each of the ret_typeX code fragments has to be exactly 16 bytes long
+# (4 instructions). For cache effectiveness we align to a 16 byte boundary
+# first.
+ .align 4
+
+ nop
+ nop
+ nop
+.Lget_ret_type0_addr:
+ blrl
+
+# case FFI_TYPE_VOID
+.Lret_type0:
+ b .Lfinish
+ nop
+ nop
+ nop
+
+# case FFI_TYPE_INT
+.Lret_type1:
+ lwz %r3,0(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_FLOAT
+.Lret_type2:
lfs %f1,0(%r5)
- b .L44
-
-# case long long
-.L48:
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_DOUBLE
+.Lret_type3:
+ lfd %f1,0(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_LONGDOUBLE
+.Lret_type4:
+ lfd %f1,0(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_UINT8
+.Lret_type5:
+ lbz %r3,3(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_SINT8
+.Lret_type6:
+ lbz %r3,3(%r5)
+ extsb %r3,%r3
+ b .Lfinish
+ nop
+
+# case FFI_TYPE_UINT16
+.Lret_type7:
+ lhz %r3,2(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_SINT16
+.Lret_type8:
+ lha %r3,2(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_UINT32
+.Lret_type9:
+ lwz %r3,0(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_SINT32
+.Lret_type10:
+ lwz %r3,0(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case FFI_TYPE_UINT64
+.Lret_type11:
lwz %r3,0(%r5)
lwz %r4,4(%r5)
- b .L44
-
-# case default / int32 / pointer
-.L50:
+ b .Lfinish
+ nop
+
+# case FFI_TYPE_SINT64
+.Lret_type12:
lwz %r3,0(%r5)
- b .L44
-
-# case signed int8
-.L55:
- addi %r5,%r5,3
- lbz %r3,0(%r5)
- extsb %r3,%r3
- b .L44
-
-# case unsigned int8
-.L56:
- addi %r5,%r5,3
- lbz %r3,0(%r5)
- b .L44
-
-# case signed int16
-.L57:
- addi %r5,%r5,2
- lhz %r3,0(%r5)
- extsh %r3,%r3
- b .L44
-
-#case unsigned int16
-.L58:
- addi %r5,%r5,2
- lhz %r3,0(%r5)
-
-# case void / done
-.L44:
+ lwz %r4,4(%r5)
+ b .Lfinish
+ nop
+
+# case FFI_TYPE_STRUCT
+.Lret_type13:
+ b .Lfinish
+ nop
+ nop
+ nop
+
+# case FFI_TYPE_POINTER
+.Lret_type14:
+ lwz %r3,0(%r5)
+ b .Lfinish
+ nop
+ nop
+
+# case done
+.Lfinish:
- lwz %r11,0(%r1)
- lwz %r0,4(%r11)
+ lwz %r0,148(%r1)
mtlr %r0
- lwz %r31,-4(%r11)
- mr %r1,%r11
+ addi %r1,%r1,144
blr
END(ffi_closure_SYSV)
diff --git a/libffi/src/sparc/v8.S b/libffi/src/sparc/v8.S
index 0357f4de7d7..d94fe03d2aa 100644
--- a/libffi/src/sparc/v8.S
+++ b/libffi/src/sparc/v8.S
@@ -36,7 +36,9 @@
ffi_call_V8:
_ffi_call_V8:
+.LLFB1:
save %sp, -STACKFRAME, %sp
+.LLCFI0:
sub %sp, %i2, %sp ! alloca() space in stack for frame to set up
add %sp, STACKFRAME, %l0 ! %l0 has start of
@@ -87,7 +89,62 @@ longlong:
st %o1, [%i4+4]
ret
restore
+.LLFE1:
.ffi_call_V8_end:
- .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8
-
+ .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8
+
+#ifdef SPARC64
+#define WS 8
+#define nword xword
+#define uanword uaxword
+#else
+#define WS 4
+#define nword long
+#define uanword uaword
+#endif
+
+ .section ".eh_frame",#alloc,#write
+.LLframe1:
+ .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry
+.LLSCIE1:
+ .uaword 0x0 ! CIE Identifier Tag
+ .byte 0x1 ! CIE Version
+ .ascii "zR\0" ! CIE Augmentation
+ .byte 0x1 ! uleb128 0x1; CIE Code Alignment Factor
+ .byte 0x80-WS ! sleb128 -WS; CIE Data Alignment Factor
+ .byte 0xf ! CIE RA Column
+ .byte 0x1 ! uleb128 0x1; Augmentation size
+#ifdef HAVE_AS_SPARC_UA_PCREL
+ .byte 0x1b ! FDE Encoding (pcrel sdata4)
+#else
+ .byte 0x50 ! FDE Encoding (aligned absolute)
+#endif
+ .byte 0xc ! DW_CFA_def_cfa
+ .byte 0xe ! uleb128 0xe
+ .byte 0x0 ! uleb128 0x0
+ .align WS
+.LLECIE1:
+.LLSFDE1:
+ .uaword .LLEFDE1-.LLASFDE1 ! FDE Length
+.LLASFDE1:
+ .uaword .LLASFDE1-.LLframe1 ! FDE CIE offset
+#ifdef HAVE_AS_SPARC_UA_PCREL
+ .uaword %r_disp32(.LLFB1)
+ .uaword .LLFE1-.LLFB1 ! FDE address range
+#else
+ .align WS
+ .nword .LLFB1
+ .uanword .LLFE1-.LLFB1 ! FDE address range
+#endif
+ .byte 0x0 ! uleb128 0x0; Augmentation size
+ .byte 0x4 ! DW_CFA_advance_loc4
+ .uaword .LLCFI0-.LLFB1
+ .byte 0xd ! DW_CFA_def_cfa_register
+ .byte 0x1e ! uleb128 0x1e
+ .byte 0x2d ! DW_CFA_GNU_window_save
+ .byte 0x9 ! DW_CFA_register
+ .byte 0xf ! uleb128 0xf
+ .byte 0x1f ! uleb128 0x1f
+ .align WS
+.LLEFDE1:
diff --git a/libffi/src/sparc/v9.S b/libffi/src/sparc/v9.S
index c937f439304..bd358c0d84d 100644
--- a/libffi/src/sparc/v9.S
+++ b/libffi/src/sparc/v9.S
@@ -41,7 +41,9 @@
ffi_call_V9:
_ffi_call_V9:
+.LLFB1:
save %sp, -STACKFRAME, %sp
+.LLCFI0:
sub %sp, %i2, %sp ! alloca() space in stack for frame to set up
add %sp, STACKFRAME+STACK_BIAS, %l0 ! %l0 has start of
@@ -118,8 +120,54 @@ dostruct:
std %f6, [%i4+56]
ret
restore
+.LLFE1:
.ffi_call_V9_end:
- .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9
+ .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9
+
+ .section ".eh_frame",#alloc,#write
+.LLframe1:
+ .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry
+.LLSCIE1:
+ .uaword 0x0 ! CIE Identifier Tag
+ .byte 0x1 ! CIE Version
+ .ascii "zR\0" ! CIE Augmentation
+ .byte 0x1 ! uleb128 0x1; CIE Code Alignment Factor
+ .byte 0x78 ! sleb128 -8; CIE Data Alignment Factor
+ .byte 0xf ! CIE RA Column
+ .byte 0x1 ! uleb128 0x1; Augmentation size
+#ifdef HAVE_AS_SPARC_UA_PCREL
+ .byte 0x1b ! FDE Encoding (pcrel sdata4)
+#else
+ .byte 0x50 ! FDE Encoding (aligned absolute)
+#endif
+ .byte 0xc ! DW_CFA_def_cfa
+ .byte 0xe ! uleb128 0xe
+ .byte 0xff,0xf ! uleb128 0x7ff
+ .align 8
+.LLECIE1:
+.LLSFDE1:
+ .uaword .LLEFDE1-.LLASFDE1 ! FDE Length
+.LLASFDE1:
+ .uaword .LLASFDE1-.LLframe1 ! FDE CIE offset
+#ifdef HAVE_AS_SPARC_UA_PCREL
+ .uaword %r_disp32(.LLFB1)
+ .uaword .LLFE1-.LLFB1 ! FDE address range
+#else
+ .align 8
+ .xword .LLFB1
+ .uaxword .LLFE1-.LLFB1 ! FDE address range
+#endif
+ .byte 0x0 ! uleb128 0x0; Augmentation size
+ .byte 0x4 ! DW_CFA_advance_loc4
+ .uaword .LLCFI0-.LLFB1
+ .byte 0xd ! DW_CFA_def_cfa_register
+ .byte 0x1e ! uleb128 0x1e
+ .byte 0x2d ! DW_CFA_GNU_window_save
+ .byte 0x9 ! DW_CFA_register
+ .byte 0xf ! uleb128 0xf
+ .byte 0x1f ! uleb128 0x1f
+ .align 8
+.LLEFDE1:
#endif
diff --git a/libffi/src/x86/ffi.c b/libffi/src/x86/ffi.c
index a6e73f711e3..acc6529bb14 100644
--- a/libffi/src/x86/ffi.c
+++ b/libffi/src/x86/ffi.c
@@ -37,7 +37,6 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
{
register unsigned int i;
register int tmp;
- register unsigned int avn;
register void **p_argv;
register char *argp;
register ffi_type **p_arg;
@@ -45,73 +44,68 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
tmp = 0;
argp = stack;
- if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
- *(void **) argp = ecif->rvalue;
- argp += 4;
- }
+ if (ecif->cif->rtype->type == FFI_TYPE_STRUCT)
+ {
+ *(void **) argp = ecif->rvalue;
+ argp += 4;
+ }
- avn = ecif->cif->nargs;
p_argv = ecif->avalue;
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
- (i != 0) && (avn != 0);
+ i != 0;
i--, p_arg++)
{
size_t z;
/* Align if necessary */
- if (((*p_arg)->alignment - 1) & (unsigned) argp) {
+ if (((*p_arg)->alignment - 1) & (unsigned) argp)
argp = (char *) ALIGN(argp, (*p_arg)->alignment);
- }
- if (avn != 0)
+ z = (*p_arg)->size;
+ if (z < sizeof(int))
{
- avn--;
- z = (*p_arg)->size;
- if (z < sizeof(int))
- {
- z = sizeof(int);
- switch ((*p_arg)->type)
- {
- case FFI_TYPE_SINT8:
- *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
- break;
-
- case FFI_TYPE_UINT8:
- *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
- break;
-
- case FFI_TYPE_SINT16:
- *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
- break;
-
- case FFI_TYPE_UINT16:
- *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
- break;
-
- case FFI_TYPE_SINT32:
- *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv);
- break;
-
- case FFI_TYPE_UINT32:
- *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
- break;
-
- case FFI_TYPE_STRUCT:
- *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
- break;
-
- default:
- FFI_ASSERT(0);
- }
- }
- else
+ z = sizeof(int);
+ switch ((*p_arg)->type)
{
- memcpy(argp, *p_argv, z);
+ case FFI_TYPE_SINT8:
+ *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_UINT8:
+ *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_SINT16:
+ *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_UINT16:
+ *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_SINT32:
+ *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_UINT32:
+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_STRUCT:
+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
+ break;
+
+ default:
+ FFI_ASSERT(0);
}
- p_argv++;
- argp += z;
}
+ else
+ {
+ memcpy(argp, *p_argv, z);
+ }
+ p_argv++;
+ argp += z;
}
return;
@@ -273,7 +267,6 @@ ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
{
register unsigned int i;
register int tmp;
- register unsigned int avn;
register void **p_argv;
register char *argp;
register ffi_type **p_arg;
@@ -286,35 +279,26 @@ ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
argp += 4;
}
- avn = cif->nargs;
p_argv = avalue;
- for (i = cif->nargs, p_arg = cif->arg_types;
- (i != 0) && (avn != 0);
- i--, p_arg++)
+ for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)
{
size_t z;
/* Align if necessary */
- if (((*p_arg)->alignment - 1) & (unsigned) argp) {
+ if (((*p_arg)->alignment - 1) & (unsigned) argp)
argp = (char *) ALIGN(argp, (*p_arg)->alignment);
- }
- if (avn != 0)
- {
- avn--;
- z = (*p_arg)->size;
+ z = (*p_arg)->size;
- /* because we're little endian, this is
- what it turns into. */
+ /* because we're little endian, this is what it turns into. */
- *p_argv = (void*) argp;
+ *p_argv = (void*) argp;
- p_argv++;
- argp += z;
- }
+ p_argv++;
+ argp += z;
}
-
+
return;
}