diff --git a/clisp-2.39-clx.dif b/clisp-2.39-clx.dif index aed5fc1..7f6509d 100644 --- a/clisp-2.39-clx.dif +++ b/clisp-2.39-clx.dif @@ -20,17 +20,3 @@ /* ----------------------------------------------------------------------- -@@ -4479,11 +4481,12 @@ static XCharStruct *font_char_info (XFon - */ - - if (fs->min_byte1 == 0 && fs->max_byte1 == 0) { /* Linear indexing ... */ -- if (index >= fs->min_char_or_byte2 && index <= fs->max_char_or_byte2) -+ if (index >= fs->min_char_or_byte2 && index <= fs->max_char_or_byte2) { - if (fs->per_char) - return fs->per_char+(index-fs->min_char_or_byte2); - else - return &(fs->min_bounds); -+ } - } else { /* Nonlinear indexing .. */ - unsigned char byte1 = (index >> 8) &0xFF; /* Is this right?! */ - unsigned char byte2 = index & 0xFF; diff --git a/clisp-2.41.tar.bz2 b/clisp-2.41.tar.bz2 deleted file mode 100644 index bbc1d05..0000000 --- a/clisp-2.41.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e5f8d9b04024ae072536ae3271075c1a422c02d3997a729a6b00912ed2ae323 -size 8319471 diff --git a/clisp-2.41.dif b/clisp-2.43.dif similarity index 56% rename from clisp-2.41.dif rename to clisp-2.43.dif index 78635f1..4aeee2e 100644 --- a/clisp-2.41.dif +++ b/clisp-2.43.dif @@ -1,45 +1,18 @@ --- .pkgextract +++ .pkgextract 2006-05-22 18:06:36.000000000 +0200 -@@ -0,0 +1,6 @@ +@@ -0,0 +1,9 @@ +patch -p0 -s --suffix=.mappriv < ../clisp-2.31-map_private.patch +patch -p0 -s --suffix=.mapvar < ../clisp-2.31-map_variable.patch +patch -p0 -s --suffix=.sel < ../clisp-2.31-personality.patch -+patch -p0 -s --suffix=.ia64 < ../clisp-2.33.2-ia64.dif ++patch -p0 -s --suffix=.ia64 < ../clisp-2.39-ia64.dif +patch -p0 -s --suffix=.alloca < ../clisp-2.36-alloca.patch -+patch -p0 -s --suffix=.dump < ../clisp-2.39-dump.dif ---- configure -+++ configure 2006-05-22 18:06:36.000000000 +0200 -@@ -341,6 +341,17 @@ - passnext=yes - passnextm=yes ;; - -+ -libdir=* | --libdir=* | --libdi=* | --libd=*) -+ subdir_configure_args="$subdir_configure_args $arg" -+ makemake_args="$makemake_args --libdir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;; -+ -+ -libdir | --libdir | --libdi | --libd) -+ subdir_configure_args="$subdir_configure_args $arg" -+ makemake_args="$makemake_args --libdir=" -+ prev=libdir -+ passnext=yes -+ passnextm=yes ;; -+ - --hyperspec=* | --hyperspe=* | --hypersp=* | --hypers=* | --hs=* | --hy=*) - makemake_args="$makemake_args --hyperspec="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;; - -@@ -718,9 +729,6 @@ - make config.lisp; - ${EDITOR:-vi} config.lisp; - fi -- # ulimit: just to make sure, should not hurt -- # cygwin /bin/sh ulimit is broken -- set +e; ulimit -s 8192 2>/dev/null; set -e; - make - make check - cd .. ++patch -p0 -s --suffix=.wooh < ../clisp-2.39-ia64-wooh.dif ++patch -p0 -s --suffix=.clx < ../clisp-2.39-clx.dif ++patch -p0 -s --suffix=.bdb < ../clisp-2.39-berkeley-db.dif ++patch -p1 -s --suffix=.ffcall < ../ffcall_1.10+2.41-3.diff --- ffcall/build-aux/config.guess +++ ffcall/build-aux/config.guess 2006-05-22 18:06:36.000000000 +0200 -@@ -983,6 +983,7 @@ +@@ -985,6 +985,7 @@ EOF exit ;; esac # Determine whether the default compiler is a.out or elf @@ -49,7 +22,7 @@ #include --- ffcall/callback/trampoline_r/trampoline.c +++ ffcall/callback/trampoline_r/trampoline.c 2006-05-22 18:06:36.000000000 +0200 -@@ -191,15 +191,11 @@ +@@ -191,15 +191,11 @@ extern RETGETPAGESIZETYPE getpagesize (v #ifdef ultrix #include #else @@ -65,31 +38,6 @@ #ifdef __m88k__ #include #endif ---- libcharset/build-aux/config.guess -+++ libcharset/build-aux/config.guess 2006-05-22 18:06:36.000000000 +0200 -@@ -983,6 +983,7 @@ - exit ;; - esac - # Determine whether the default compiler is a.out or elf -+ test -e /etc/SuSE-release && VENDOR=suse - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include ---- libcharset/lib/Makefile.in -+++ libcharset/lib/Makefile.in 2006-05-22 18:06:36.000000000 +0200 -@@ -57,10 +57,10 @@ - $(LIBTOOL_LINK) $(CC) $(LDFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS) - - localcharset.lo : $(srcdir)/localcharset.c -- $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/localcharset.c -+ $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -c $(srcdir)/localcharset.c - - relocatable.lo : $(srcdir)/relocatable.c $(srcdir)/relocatable.h -- $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/relocatable.c -+ $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -c $(srcdir)/relocatable.c - - charset.alias: $(srcdir)/config.charset - $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ --- modules/clx/new-clx/README.SuSE +++ modules/clx/new-clx/README.SuSE 2006-05-22 18:06:36.000000000 +0200 @@ -1,35 +1,34 @@ @@ -149,10 +97,21 @@ (export '(*version* access-control access-error access-hosts activate-screen-saver add-access-host add-resource add-to-save-set alist alloc-color +--- modules/clx/new-clx/demos/clx-demos.lisp ++++ modules/clx/new-clx/demos/clx-demos.lisp 2007-12-17 15:28:27.914179351 +0100 +@@ -11,7 +11,7 @@ + + (defparameter *demos* + ;; (demo-name [package requirements]) +- '((koch) (qix) (sokoban #:xpm) (greynetic #:broken!) (petal) (hanoi) ++ '((greynetic #:broken!) (petal) (hanoi) + (recurrence) (plaid) (clclock) (bball #:broken!) (bwindow))) + + (defmacro do-demos ((fun-var) &body body) --- modules/clx/new-clx/demos/koch.lisp -+++ modules/clx/new-clx/demos/koch.lisp 2006-05-22 18:06:36.000000000 +0200 ++++ modules/clx/new-clx/demos/koch.lisp 2007-12-17 15:30:15.215811911 +0100 @@ -7,7 +7,30 @@ - ;;; $Id: koch.lisp,v 1.1 2005/09/28 22:23:24 sds Exp $ + ;;; $Id: koch.lisp,v 1.4 2007/10/08 00:43:32 sds Exp $ ;;; $Source: /cvsroot/clisp/clisp/modules/clx/new-clx/demos/koch.lisp,v $ -(in-package :clx-demos) @@ -183,18 +142,17 @@ (defun koch-point (cx width/2 height/2 scale) (list (round (+ width/2 (* scale width/2 (realpart cx)))) -@@ -118,7 +141,7 @@ +@@ -119,4 +142,8 @@ Returns the new list and an indicator of + (xlib:display-finish-output dpy) (xlib:close-display dpy))) - (format t "~& Koch snoflake:~% -- (clx-demos:koch :width :height :delay :x :y :scale :font) --~% Call (clx-demos:koch).~%") ++(format t "~& Koch snoflake:~% + (koch:koch :width :height :delay :x :y :scale :font) +~% Call (koch:koch)~%~%") - - (provide :koch) ++ + (provide "koch") --- modules/clx/new-clx/demos/qix.lisp -+++ modules/clx/new-clx/demos/qix.lisp 2006-05-22 18:06:36.000000000 +0200 ++++ modules/clx/new-clx/demos/qix.lisp 2007-12-17 15:29:47.712318245 +0100 @@ -14,7 +14,30 @@ ;;;; o or a spline option?! ;;;; @@ -227,19 +185,19 @@ (defvar *offset* 3) (defvar *delta* 6) -@@ -92,7 +115,7 @@ +@@ -88,4 +111,9 @@ + (xlib:display-finish-output dpy) + (xlib:close-display dpy))) - ;; since we have no herald, simply dump it: - (format t "~& The famous swirling vectors.~% -- (clx-demos:qix :host :display :dpy :width :height :delay :nqixs :nlines) --~% Call (clx-demos:qix) or (clx-demos:qix :delay 0).~%") -+ (qix:qix :host :display :dpy :width :height :delay :nqixs :nlines) ++;; since we have no herald, simply dump it: ++(format t "~& The famous swirling vectors.~% ++ (qix:qix :host :display :dpy :width :height :delay :nqixs :nlines) +~% Call (qix:qix) or (qix:qix :delay 0)~%~%") - ++ (provide "qix") --- modules/clx/new-clx/demos/sokoban.lisp -+++ modules/clx/new-clx/demos/sokoban.lisp 2006-05-22 18:06:36.000000000 +0200 -@@ -39,7 +39,30 @@ ++++ modules/clx/new-clx/demos/sokoban.lisp 2007-12-17 15:30:21.648628989 +0100 +@@ -41,7 +41,30 @@ ;;;; - maximum field size is hard wired to 20x20. (This is not in the LISP spirit!) ;;;; - sometimes the programm could not count correctly ... @@ -271,7 +229,7 @@ ;;;; First a lot of global variables ... (defvar *pixmaps* nil) ;array of pixmaps according to below indices -@@ -222,7 +245,12 @@ +@@ -228,7 +251,12 @@ (nny (+ ny dy))) (when (>= (field nnx nny) %floor) ;;Ok its legal ... @@ -285,118 +243,55 @@ (= (field nnx nny) %goal)) (decf *n-objects*)) (incf (field nx ny) 4) ;remove object and add man -@@ -462,6 +490,6 @@ - ;; These functions should realy been compiled: - ;; '(mapcar #'compile '(init-field ready-p update find-outers field find-target walk-to)) +@@ -471,4 +499,6 @@ If you quit sokoban using 'q' the curren + (setq *level* 1) + (init-field))) ) --(format t "~& Call (clx-demos:sokoban).~%") +(format t "~&~% Call (sokoban:sokoban)~%~%") - - (provide "sokoban") ---- modules/postgresql/config.h.in -+++ modules/postgresql/config.h.in 2006-05-22 18:25:12.000000000 +0200 -@@ -36,6 +36,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_MEMORY_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_PGSQL_POSTGRES_EXT_H + - /* Define to 1 if you have the header file. */ - #undef HAVE_POSTGRESQL_POSTGRES_EXT_H - + (provide "sokoban") --- modules/postgresql/configure -+++ modules/postgresql/configure 2006-05-22 18:09:09.000000000 +0200 -@@ -3481,7 +3481,7 @@ ++++ modules/postgresql/configure 2007-12-14 17:11:57.972092000 +0100 +@@ -4552,7 +4552,7 @@ done - - --for ac_header in postgres_ext.h postgresql/postgres_ext.h -+for ac_header in postgres_ext.h postgresql/postgres_ext.h pgsql/postgres_ext.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - if eval "test \"\${$as_ac_Header+set}\" = set"; then -@@ -3630,7 +3630,7 @@ - - done - --if test "$ac_cv_header_postgres_ext_h" = "no" -a "$ac_cv_header_postgresql_postgres_ext_h" = "no"; then -+if test "$ac_cv_header_postgres_ext_h" = "no" -a "$ac_cv_header_postgresql_postgres_ext_h" = "no" -a "$ac_cv_header_pgsql_postgres_ext_h" = "no"; then + if test "$ac_cv_header_postgres_ext_h" = "no" \ + -a "$ac_cv_header_postgresql_postgres_ext_h" = "no" \ +- -a "$ac_cv_header_pgsql_postgres_ext_h"; then ++ -a "$ac_cv_header_pgsql_postgres_ext_h" = "no" ; then { { echo "$as_me:$LINENO: error: cannot find PostgreSQL headers" >&5 echo "$as_me: error: cannot find PostgreSQL headers" >&2;} { (exit 1); exit 1; }; } --- modules/postgresql/configure.in -+++ modules/postgresql/configure.in 2006-05-22 18:09:54.000000000 +0200 -@@ -18,8 +18,8 @@ - AC_MSG_NOTICE([* PostgreSQL (Headers)]) - AC_HEADER_STDC - AC_HEADER_TIME --AC_CHECK_HEADERS(postgres_ext.h postgresql/postgres_ext.h) --if test "$ac_cv_header_postgres_ext_h" = "no" -a "$ac_cv_header_postgresql_postgres_ext_h" = "no"; then -+AC_CHECK_HEADERS(postgres_ext.h postgresql/postgres_ext.h pgsql/postgres_ext.h) -+if test "$ac_cv_header_postgres_ext_h" = "no" -a "$ac_cv_header_postgresql_postgres_ext_h" = "no" -a "$ac_cv_header_pgsql_postgres_ext_h" = "no"; then ++++ modules/postgresql/configure.in 2007-12-14 17:11:40.257845000 +0100 +@@ -19,7 +19,7 @@ BOLD_MSG([PostgreSQL (Headers)]) + AC_CHECK_HEADERS(postgres_ext.h postgresql/postgres_ext.h pgsql/postgres_ext.h) + if test "$ac_cv_header_postgres_ext_h" = "no" \ + -a "$ac_cv_header_postgresql_postgres_ext_h" = "no" \ +- -a "$ac_cv_header_pgsql_postgres_ext_h"; then ++ -a "$ac_cv_header_pgsql_postgres_ext_h" = "no" ; then AC_MSG_ERROR([cannot find PostgreSQL headers]) fi --- modules/postgresql/link.sh.in +++ modules/postgresql/link.sh.in 2006-05-22 18:06:36.000000000 +0200 -@@ -4,5 +4,5 @@ +@@ -4,5 +4,5 @@ make clisp-module \ INCLUDES="$absolute_linkkitdir" NEW_FILES='' for f in ${NEW_MODULES}; do NEW_FILES=${NEW_FILES}" ${f}.o"; done -NEW_LIBS="${NEW_FILES} @LIBS@" +NEW_LIBS="${NEW_FILES} @LIBS@ -lcrypt -lssl" TO_LOAD='postgresql sql' ---- modules/postgresql/postgresql.lisp -+++ modules/postgresql/postgresql.lisp 2006-05-22 18:12:41.000000000 +0200 -@@ -25,6 +25,8 @@ - # include - #elif defined(HAVE_POSTGRESQL_POSTGRES_EXT_H) - # include -+#elif defined(HAVE_PGSQL_POSTGRES_EXT_H) -+# include - #else - # error \"PostgreSQL is not found\" - #endif~%") -@@ -40,6 +42,8 @@ - # include - #elif defined(HAVE_POSTGRESQL_POSTGRES_EXT_H) - # include -+#elif defined(HAVE_PGSQL_POSTGRES_EXT_H) -+# include - #else - # error \"PostgreSQL is not found\" - #endif~%") -@@ -203,7 +207,8 @@ - (def-call-out PQport (:return-type c-string) (:arguments (conn PGconn))) - (def-call-out PQtty (:return-type c-string) (:arguments (conn PGconn))) - (def-call-out PQoptions (:return-type c-string) (:arguments (conn PGconn))) --(def-call-out PQstatus (:return-type ConnStatusType) (:arguments (conn PGconn))) -+;;(def-call-out PQstatus (:return-type ConnStatusType) (:arguments (conn PGconn))) -+(def-call-out PQstatus (:return-type int) (:arguments (conn PGconn))) - (def-call-out PQtransactionStatus (:return-type PGTransactionStatusType) - (:arguments (conn PGconn))) - (def-call-out PQparameterStatus (:return-type c-string) -@@ -334,7 +339,8 @@ - (nargs int))) - - ;; Accessor functions for PGresult objects --(def-call-out PQresultStatus (:return-type ExecStatusType) -+;;(def-call-out PQresultStatus (:return-type ExecStatusType) -+(def-call-out PQresultStatus (:return-type int) - (:arguments (res PGresult))) - (def-call-out PQresStatus (:return-type c-string) - (:arguments (status ExecStatusType))) -@@ -383,7 +389,8 @@ - (def-call-out PQfreemem (:return-type nil) (:arguments (res c-pointer))) - - (def-call-out PQmakeEmptyPGresult (:return-type PGresult) -- (:arguments (conn PGconn) (status ExecStatusType))) -+;; (:arguments (conn PGconn) (status ExecStatusType))) -+ (:arguments (conn PGconn) (status int))) - - ;; Quoting strings before inclusion in queries - (def-call-out PQescapeString (:return-type uint) +--- src/aclocal.m4 ++++ src/aclocal.m4 2007-12-14 16:58:01.413975000 +0100 +@@ -9872,7 +9872,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do +- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" ++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-Wl,-rpath-link$found_dir" + done + fi + ]) --- src/lispbibl.d +++ src/lispbibl.d 2006-05-22 18:06:36.000000000 +0200 @@ -223,7 +223,7 @@ @@ -408,7 +303,7 @@ #define UNIX_LINUX # Linux (Linus Torvalds Unix) #endif #ifdef __GNU__ -@@ -1273,7 +1273,7 @@ +@@ -1255,7 +1255,7 @@ typedef signed int signean; #include #else #undef offsetof @@ -417,7 +312,7 @@ #endif # Determine the offset of an array 'ident' in a struct of the type 'type': #if defined(__cplusplus) || defined(MICROSOFT) -@@ -3333,9 +3333,9 @@ +@@ -3318,9 +3318,9 @@ typedef signed_int_with_n_bits(intVsize) # type_data_object(type,data) #if defined(WIDE) && defined(WIDE_STRUCT) #if BIG_ENDIAN_P==WIDE_ENDIANNESS @@ -430,8 +325,8 @@ #elif !(oint_addr_shift==0) #define type_data_object(type,data) \ --- src/makemake.in -+++ src/makemake.in 2006-05-22 18:06:36.000000000 +0200 -@@ -218,6 +218,9 @@ ++++ src/makemake.in 2007-12-17 13:52:35.689747081 +0100 +@@ -226,6 +226,9 @@ verbose=${CLISP_MAKEMAKE_VERBOSE:-false} # Handle --with-... arguments while test -z "$endofargs"; do case "$1" in @@ -441,31 +336,31 @@ -verb* | --verb* ) verbose=`echol "$1"|sed 's/-*v[^=]*=*//'` test -n "${verbose}" || verbose=true -@@ -1618,6 +1621,10 @@ - EVERY_INCLUDES_H=$EVERY_INCLUDES_H' libcharset.h' - fi - -+if [ -n "${MYCFLAGS}" ] ; then -+ XCFLAGS=$XCFLAGS' ${MYCFLAGS} ' -+fi -+ - OTHER_INCLUDES=' constpack avl sort subrkw bytecode' - - SPVW_INCLUDES=' spvw_module spvw_debug spvw_alloca spvw_mmap spvw_multimap spvw_singlemap spvw_page spvw_heap spvw_global spvw_gcstat spvw_space spvw_mark spvw_objsize spvw_update spvw_fault spvw_sigsegv spvw_sigcld spvw_sigpipe spvw_sigint spvw_sigwinch spvw_sigterm spvw_garcol spvw_genera1 spvw_gcmark spvw_genera2 spvw_weak spvw_genera3 spvw_allocate spvw_typealloc spvw_circ spvw_walk spvw_ctype spvw_language spvw_memfile' ---- src/autoconf/aclocal.m4 -+++ src/autoconf/aclocal.m4 2006-05-22 18:06:36.000000000 +0200 -@@ -4028,7 +4028,7 @@ - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do -- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" -+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-Wl,-rpath-link$found_dir" - done +@@ -822,8 +825,8 @@ fi + # and the implied value from fsstnd overrides the default. + if [ -z "$docdir" ] ; then + if [ $HOS = unix ] ; then +- docdir='@docdir@' # usually '${datarootdir}/doc/${PACKAGE}' +- if [ "$docdir" = '${datarootdir}/doc/${PACKAGE}' ] ; then ++ docdir='@docdir@' # usually '${datarootdir}/doc/${PACKAGE_TARNAME}' ++ if [ "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' ] ; then + docdir= + else + PACKAGE=clisp ; eval docdir=\"$docdir\" +@@ -1210,6 +1213,10 @@ if [ $XCC_GCC = true ] ; then + XCFLAGS=${XCFLAGS}" -pthread" fi - ]) + ++ if [ -n "${MYCFLAGS}" ] ; then ++ XCFLAGS=$XCFLAGS' ${MYCFLAGS} ' ++ fi ++ + else + + if [ $TSYS = sun4 -a $CROSS = false ] ; then --- src/build-aux/config.guess +++ src/build-aux/config.guess 2006-05-22 18:06:36.000000000 +0200 -@@ -983,6 +983,7 @@ +@@ -985,6 +985,7 @@ EOF exit ;; esac # Determine whether the default compiler is a.out or elf @@ -475,7 +370,7 @@ #include --- utils/gctrigger.d +++ utils/gctrigger.d 2006-05-22 18:06:36.000000000 +0200 -@@ -602,6 +602,7 @@ +@@ -602,6 +602,7 @@ local inline void VectorToken_delete (Ve local Token nexttoken (boolean within_prep_directive) { Token token; @@ -483,3 +378,14 @@ restart: { var int c = next_char(); switch (c) { +--- utils/modprep.lisp ++++ utils/modprep.lisp 2007-12-14 17:18:49.740318000 +0100 +@@ -313,7 +313,7 @@ FOO(bar,baz,zot) ==> FOO; (bar baz zot); + ((or (char= cc #\_) (char= cc #\-)) (write-char #\_ out)) + (t (format out "_~2,'0x" (char-code cc)))))) + +-(defvar *tag-length-limit* 2000 ++(defvar *tag-length-limit* 4096 + "The approximate maximum length of a C name. + This works around the failure on i18n on Alpha Linux: + /tmp/ccYZBYCX.s: Assembler messages: diff --git a/clisp-2.43.tar.bz2 b/clisp-2.43.tar.bz2 new file mode 100644 index 0000000..a933b02 --- /dev/null +++ b/clisp-2.43.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5213ccc59d65c190f47c0e4f04d568a1a66bcb28ae5ed59705e59c6b8b11e83 +size 8143871 diff --git a/clisp.changes b/clisp.changes index da0dd12..d5fc712 100644 --- a/clisp.changes +++ b/clisp.changes @@ -1,3 +1,104 @@ +------------------------------------------------------------------- +Mon Dec 17 15:09:09 CET 2007 - werner@suse.de + +- Add workaround to gcc bug in -O2 on i386 + +------------------------------------------------------------------- +Fri Dec 14 17:02:38 CET 2007 - werner@suse.de + +- Update to 2.43 + + * Infrastructure: + + Top-level configure now accepts a new option --vimdir which specifies + the installation directory for the VIM files (lisp.vim). + The default value is ${datadir}/vim/vimfiles/after/syntax/. + Thus, lisp.vim is now installed by "make install", and should + be included in the 3rd party distributions. + + Top-level configure now always runs makemake, and makemake no longer is + a "user-level" command; do not run it unless you know what you are doing. + This brings the CLISP build process in compliance with the GNU standards. + + We now use gnulib-tool to sync with gnulib (not really user visible, + but a major infrastructure change). + + * Portability: + + Support for ancient systems with broken CPP have been dropped. + This includes AIX 4.2, Coherent386, Ultrix, MSVC4, MSVC5. + + NeXT application (GUI) code has been removed. Plain TTY is still supported. + + * Module berkeley-db now supports Berkeley DB 4.5 & 4.6. + + * Bug fixes: + + FORCE-OUTPUT breakage on MacOS X when stdout is not a terminal. [ 1827572 ] + + Fixed *PRINT-PPRINT-DISPATCH* binding in WITH-STANDARD-IO-SYNTAX. + [ 1831367 ] + +- Update to 2.42 + + * New module gtk2 interfaces to GTK+ v2 and makes it possible to build + GUI with Glade. + Thanks to James Bailey for the original code. + See for details. + + * New module gdbm interfaces to GNU DataBase Manager. + Thanks to Masayuki Onjo . + See for details. + + * A kind of Meta-Object Protocol for structures is now available. + See for details. + + * Module libsvm has been upgraded to the upstream version 2.84. + See for details. + + * NEW-CLX module now supports Stumpwm . + Thanks to Shawn Betts . + New NEW-CLX demos: bball bwindow greynetic hanoi petal plaid recurrence from + . + New NEW-CLX demo: clclock based on . + New function XLIB:OPEN-DEFAULT-DISPLAY from portable CLX. + + * Function EXT:ARGLIST now works on macros too. + See for details. + + * Macro TRACE has a new option :BINDINGS, which is useful to share data + between PRE-* and POST-* forms. + See for details. + + * Macro FFI:DEF-C-TYPE can now be called with one argument to define an + integer type. + See for details. + + * New function EXT:RENAME-DIR can be used to rename directories. + See for details. + + * Functions FILE-LENGTH and FILE-POSITION now work on unbuffered streams too. + See for details. + + * Bug fixes: + + Fixed EXT:LETF to work with more than one place. [ 1731462 ] + + Fixed rounding of long floats [even+1/2]. [ 1589311 ] + + Fixed stdio when running without a TTY, e.g., under SSH. [ 1592343 ] + + ANSI compliance: PPRINT dispatch is now respected for nested + objects, not just the top-level. [ 1483768, 1598053 ] + + Fixed print-read-consistency of strings containing #\Return characters + (manifested by COMPILE-FILE). [ 1578179 ] + + Fixed "clisp-link run". [ 1469663 ] + + Fixed ATANH branch cut continuity. [ 1436987 ] + + Reset the function lambda expression when loading a compiled file. + [ 1603260 ] + + DOCUMENTATION set by SETF is now preserved by COMPILE. [ 1604579 ] + + LISTEN now calls STREAM-LISTEN as per the Gray proposal. [ 1607666 ] + + IMPORT into the KEYWORD package does not make a symbol a constant + variable. [ 1612859 ] + + DEFPACKAGE code was executed during non top-level compilation. [ 1612313 ] + + Fixed format error message formatting. [ 1482465 ] + + Fixed *PPRINT-FIRST-NEWLINE* handling. [ 1412454 ] + + Improved hash code generation for very large bignums and for long lists. + [ 948868, 1208124 ] + + Some bugs related to UNICODE-16 & UNICODE-32. [ 1564818, 1631760, 1632718 ] + + All exported defined symbols are now properly locked. [ 1713130 ] + + Berkeley-DB module no longer fills up error log file. [ 1779416 ] + + New-clx now supports 64-bit KeySym. [ 1797132 ] + ------------------------------------------------------------------- Tue May 22 15:43:32 CEST 2007 - ro@suse.de diff --git a/clisp.spec b/clisp.spec index d6bcbf0..23a4671 100644 --- a/clisp.spec +++ b/clisp.spec @@ -1,5 +1,5 @@ # -# spec file for package clisp (Version 2.41) +# spec file for package clisp (Version 2.43) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,13 +20,14 @@ ExcludeArch: ppc64 s390x armv4l # to BuildRequires # %define debug no -License: GNU General Public License (GPL) +License: GPL v2 or later Group: Development/Languages/Other -Autoreqprov: on -Version: 2.41 +PreReq: vim +AutoReqProv: on +Version: 2.43 Release: 1 Summary: A Common Lisp Interpreter -URL: http://clisp.cons.org +Url: http://clisp.cons.org Source: ftp://ftp.gnu.org/pub/gnu/clisp/latest/clisp-%{version}.tar.bz2 Patch: clisp-%{version}.dif Patch1: clisp-2.31-map_private.patch @@ -37,7 +38,9 @@ Patch5: clisp-2.36-alloca.patch Patch7: clisp-2.39-ia64-wooh.dif Patch8: clisp-2.39-clx.dif Patch9: clisp-2.39-berkeley-db.dif +Patch10: ffcall_1.10+2.41-3.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build +%global vimdir %{_datadir}/vim/current/vimfiles/after/syntax %description Common Lisp is a high-level, all-purpose programming language. CLISP is @@ -76,14 +79,15 @@ Authors: %prep %setup -q -%patch -P 1 -b .mappriv -%patch -P 2 -b .mapvar -%patch -P 3 -b .sel -%patch -P 4 -b .ia64 -%patch -P 5 -b .alloca -%patch -P 7 -b .wooh -%patch -P 8 -b .clx -%patch -P 9 -b .bdb +%patch1 -p0 -b .mappriv +%patch2 -p0 -b .mapvar +%patch3 -p0 -b .sel +%patch4 -p0 -b .ia64 +%patch5 -p0 -b .alloca +%patch7 -p0 -b .wooh +%patch8 -p0 -b .clx +%patch9 -p0 -b .bdb +%patch10 -p1 -b .ffcall %patch %build @@ -110,30 +114,36 @@ export PATH="$PATH:." # Set gcc command line but do not use CFLAGS # if test %debug = yes ; then - CC=g++ + CC="g++ ${RPM_OPT_FLAGS}" else - CC=gcc + CC="gcc ${RPM_OPT_FLAGS}" fi -CC="${CC} ${RPM_OPT_FLAGS} -g -fPIC -D_GNU_SOURCE" -CC="${CC} -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -CC="${CC} -pipe -fno-strict-aliasing -Wno-unused -Wno-uninitialized" -noexec="-DLINUX_NOEXEC_HEAPCODES" -nommap="-DNO_MULTIMAP_SHM -DNO_MULTIMAP_FILE -DNO_SINGLEMAP -DNO_TRIVIALMAP" -safety="-DSAFETY=3 -fno-gcse -O" +%if %suse_version > 1030 + CC="${CC} -fno-inline-small-functions" +%endif +MYCFLAGS="${MYCFLAGS} -g -fPIC -D_GNU_SOURCE -pipe" +MYCFLAGS="${MYCFLAGS} -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" +MYCFLAGS="${MYCFLAGS} -fno-strict-aliasing -Wno-unused -Wno-uninitialized" +cfi386='-falign-functions=4' +noexec='-DLINUX_NOEXEC_HEAPCODES' +nommap='-DNO_MULTIMAP_SHM -DNO_MULTIMAP_FILE -DNO_SINGLEMAP -DNO_TRIVIALMAP' +safety='-DSAFETY=3 -fno-gcse -O' case "$RPM_ARCH" in - i[0-9]86) CC="${CC} -falign-functions=4 ${noexec}" ;; - ppc) CC="${CC} ${noexec}" ;; - s390) CC="${CC} ${noexec}" ;; - x86_64) CC="${CC} ${safety}" ;; - sparc*) CC="${CC} ${safety}" ;; - ppc64) CC="${CC} ${safety} -DWIDE_HARD" ;; - s390x) CC="${CC} ${safety} -DWIDE_HARD" ;; - ia64) CC="${CC} ${safety}" ;; - axp|alpha) CC="${CC} ${nommap}" ;; + i[0-9]86) MYCFLAGS="${MYCFLAGS} ${cfi386} ${noexec}" ;; + ppc) MYCFLAGS="${MYCFLAGS} ${noexec}" ;; + s390) MYCFLAGS="${MYCFLAGS} ${noexec}" ;; + x86_64) MYCFLAGS="${MYCFLAGS} ${safety}" ;; + sparc*) MYCFLAGS="${MYCFLAGS} ${safety}" ;; +# ppc64) MYCFLAGS="${MYCFLAGS} ${safety} -DWIDE_HARD" ;; +# s390x) MYCFLAGS="${MYCFLAGS} ${safety} -DWIDE_HARD" ;; + ppc64) MYCFLAGS="${MYCFLAGS} ${safety}" ;; + s390x) MYCFLAGS="${MYCFLAGS} ${safety}" ;; + ia64) MYCFLAGS="${MYCFLAGS} ${safety}" ;; + axp|alpha) MYCFLAGS="${MYCFLAGS} ${nommap}" ;; esac export CC export MYCFLAGS -unset noexec nommap safety +unset cfi386 noexec nommap safety # # Environment for the case of missing terminal # @@ -147,26 +157,12 @@ exec 1> /tmp/clispIO 2>&1 # if test %debug = yes ; then DEBUG=--with-debug - MYCFLAGS='-g3 -DDEBUG_GCSAFETY' + MYCFLAGS="${MYCFLAGS} -g3 -DDEBUG_GCSAFETY" else DEBUG="" - MYCFLAGS="" + MYCFLAGS="${MYCFLAGS}" fi # -# Do not accept overwriting optimizing level -# -case "$RPM_ARCH" in - i[0-9]86) ;; - ppc) ;; - s390) ;; - x86_64) MYCFLAGS="${MYCFLAGS} -O" ;; - sparc*) MYCFLAGS="${MYCFLAGS} -O" ;; - ppc64) MYCFLAGS="${MYCFLAGS} -O" ;; - s390x) MYCFLAGS="${MYCFLAGS} -O" ;; - ia64) MYCFLAGS="${MYCFLAGS} -O" ;; - axp|alpha) ;; -esac -# # May interfere with configure # unset CFLAGS @@ -178,6 +174,7 @@ unset CFLAGS --prefix=%{_prefix} \ --exec-prefix=%{_prefix} \ --libdir=%{_libdir} \ + --vimdir=%{vimdir} \ --fsstnd=suse \ --ignore-absence-of-libsigsegv \ --with-readline \ @@ -210,7 +207,7 @@ SYSTEM=${RPM_ARCH}-suse-linux LSPDOC=%{_docdir}/clisp DOCDOC=${LSPDOC}/doc CLXDOC=${LSPDOC}/clx -LSPLIB=%{_libdir}/clisp +LSPLIB=%{_libdir}/clisp-%{version} CLXLIB=${LSPLIB}/full # # Install the current system @@ -220,48 +217,127 @@ make install -C ${SYSTEM} \ exec_prefix=%{_prefix} \ mandir=%{_mandir} \ libdir=%{_libdir} \ - DESTDIR=$RPM_BUILD_ROOT \ + DESTDIR=%{buildroot} \ INSTALL_DATA='install -cm 0444' # # The CLX interface # -install -d $RPM_BUILD_ROOT${CLXDOC} -install -d $RPM_BUILD_ROOT${CLXLIB} -install -d $RPM_BUILD_ROOT${LSPLIB}/fullnox +install -d %{buildroot}${CLXDOC} +install -d %{buildroot}${CLXLIB} +install -d %{buildroot}${LSPLIB}/fullnox pushd ${SYSTEM}/clx/new-clx/ - install -c -m 0444 README $RPM_BUILD_ROOT${CLXDOC}/ - install -c -m 0444 README.SuSE $RPM_BUILD_ROOT${CLXDOC}/ - tar cf - demos/ | (cd $RPM_BUILD_ROOT${CLXDOC}/ ; tar xf - ) - rm -f $RPM_BUILD_ROOT${CLXDOC}/demos/clx-demos.lisp + install -c -m 0444 README %{buildroot}${CLXDOC}/ + install -c -m 0444 README.SuSE %{buildroot}${CLXDOC}/ + tar cf - demos/ | (cd %{buildroot}${CLXDOC}/ ; tar xf - ) popd pushd ${SYSTEM}/clx/ - tar xfz clx-manual.tar.gz -C $RPM_BUILD_ROOT${CLXDOC} + tar xfz clx-manual.tar.gz -C %{buildroot}${CLXDOC} popd -chmod -R g+r,o+r $RPM_BUILD_ROOT${LSPDOC}/ -find $RPM_BUILD_ROOT${LSPDOC} -type d | xargs chmod 755 -rm -f $RPM_BUILD_ROOT${CLXDOC}/*,v -rm -f $RPM_BUILD_ROOT${CLXDOC}/.\#* -rm -f $RPM_BUILD_ROOT${CLXDOC}/demos/*,v -rm -f $RPM_BUILD_ROOT${CLXDOC}/demos/.\#* -rm -f $RPM_BUILD_ROOT${CLXDOC}/demos/*.orig -find $RPM_BUILD_ROOT${LSPLIB}/ -name '*.dvi' | xargs -r rm -f -find $RPM_BUILD_ROOT${LSPLIB}/ -name '*.run' | xargs -r chmod 0755 +chmod -R g+r,o+r %{buildroot}${LSPDOC}/ +find %{buildroot}${LSPDOC} -type d | xargs chmod 755 +rm -f %{buildroot}${CLXDOC}/*,v +rm -f %{buildroot}${CLXDOC}/.\#* +rm -f %{buildroot}${CLXDOC}/demos/*,v +rm -f %{buildroot}${CLXDOC}/demos/.\#* +rm -f %{buildroot}${CLXDOC}/demos/*.orig +find %{buildroot}${LSPLIB}/ -name '*.dvi' | xargs -r rm -f +find %{buildroot}${LSPLIB}/ -name '*.run' | xargs -r chmod 0755 %find_lang clisp %find_lang clisplow clisp.lang %files -f clisp.lang %defattr(-,root,root,755) %doc %{_docdir}/clisp/ -/usr/bin/clisp -%{_libdir}/clisp/ -/usr/share/emacs/site-lisp/clhs.el -/usr/share/emacs/site-lisp/clisp-coding.el -/usr/share/emacs/site-lisp/clisp-ffi.el -/usr/share/emacs/site-lisp/clisp-indent.el -/usr/share/emacs/site-lisp/clisp-indent.lisp +%{_bindir}/clisp +%{_libdir}/clisp-%{version}/ +%{_datadir}/emacs/site-lisp/clhs.el +%{_datadir}/emacs/site-lisp/clisp-coding.el +%{_datadir}/emacs/site-lisp/clisp-ffi.el +%{_datadir}/emacs/site-lisp/clisp-indent.el +%{_datadir}/emacs/site-lisp/clisp-indent.lisp +%{vimdir}/lisp.vim %doc %{_mandir}/man1/clisp.1.gz %changelog +* Mon Dec 17 2007 - werner@suse.de +- Add workaround to gcc bug in -O2 on i386 +* Fri Dec 14 2007 - werner@suse.de +- Update to 2.43 + * Infrastructure: + + Top-level configure now accepts a new option --vimdir which specifies + the installation directory for the VIM files (lisp.vim). + The default value is ${datadir}/vim/vimfiles/after/syntax/. + Thus, lisp.vim is now installed by "make install", and should + be included in the 3rd party distributions. + + Top-level configure now always runs makemake, and makemake no longer is + a "user-level" command; do not run it unless you know what you are doing. + This brings the CLISP build process in compliance with the GNU standards. + + We now use gnulib-tool to sync with gnulib (not really user visible, + but a major infrastructure change). + * Portability: + + Support for ancient systems with broken CPP have been dropped. + This includes AIX 4.2, Coherent386, Ultrix, MSVC4, MSVC5. + + NeXT application (GUI) code has been removed. Plain TTY is still supported. + * Module berkeley-db now supports Berkeley DB 4.5 & 4.6. + * Bug fixes: + + FORCE-OUTPUT breakage on MacOS X when stdout is not a terminal. [ 1827572 ] + + Fixed *PRINT-PPRINT-DISPATCH* binding in WITH-STANDARD-IO-SYNTAX. + [ 1831367 ] +- Update to 2.42 + * New module gtk2 interfaces to GTK+ v2 and makes it possible to build + GUI with Glade. + Thanks to James Bailey for the original code. + See for details. + * New module gdbm interfaces to GNU DataBase Manager. + Thanks to Masayuki Onjo . + See for details. + * A kind of Meta-Object Protocol for structures is now available. + See for details. + * Module libsvm has been upgraded to the upstream version 2.84. + See for details. + * NEW-CLX module now supports Stumpwm . + Thanks to Shawn Betts . + New NEW-CLX demos: bball bwindow greynetic hanoi petal plaid recurrence from + . + New NEW-CLX demo: clclock based on . + New function XLIB:OPEN-DEFAULT-DISPLAY from portable CLX. + * Function EXT:ARGLIST now works on macros too. + See for details. + * Macro TRACE has a new option :BINDINGS, which is useful to share data + between PRE-* and POST-* forms. + See for details. + * Macro FFI:DEF-C-TYPE can now be called with one argument to define an + integer type. + See for details. + * New function EXT:RENAME-DIR can be used to rename directories. + See for details. + * Functions FILE-LENGTH and FILE-POSITION now work on unbuffered streams too. + See for details. + * Bug fixes: + + Fixed EXT:LETF to work with more than one place. [ 1731462 ] + + Fixed rounding of long floats [even+1/2]. [ 1589311 ] + + Fixed stdio when running without a TTY, e.g., under SSH. [ 1592343 ] + + ANSI compliance: PPRINT dispatch is now respected for nested + objects, not just the top-level. [ 1483768, 1598053 ] + + Fixed print-read-consistency of strings containing #\Return characters + (manifested by COMPILE-FILE). [ 1578179 ] + + Fixed "clisp-link run". [ 1469663 ] + + Fixed ATANH branch cut continuity. [ 1436987 ] + + Reset the function lambda expression when loading a compiled file. + [ 1603260 ] + + DOCUMENTATION set by SETF is now preserved by COMPILE. [ 1604579 ] + + LISTEN now calls STREAM-LISTEN as per the Gray proposal. [ 1607666 ] + + IMPORT into the KEYWORD package does not make a symbol a constant + variable. [ 1612859 ] + + DEFPACKAGE code was executed during non top-level compilation. [ 1612313 ] + + Fixed format error message formatting. [ 1482465 ] + + Fixed *PPRINT-FIRST-NEWLINE* handling. [ 1412454 ] + + Improved hash code generation for very large bignums and for long lists. + [ 948868, 1208124 ] + + Some bugs related to UNICODE-16 & UNICODE-32. [ 1564818, 1631760, 1632718 ] + + All exported defined symbols are now properly locked. [ 1713130 ] + + Berkeley-DB module no longer fills up error log file. [ 1779416 ] + + New-clx now supports 64-bit KeySym. [ 1797132 ] * Tue May 22 2007 - ro@suse.de - update to 2.41 * New module libsvm interfaces to diff --git a/ffcall_1.10+2.41-3.diff b/ffcall_1.10+2.41-3.diff new file mode 100644 index 0000000..b7f975f --- /dev/null +++ b/ffcall_1.10+2.41-3.diff @@ -0,0 +1,1758 @@ +--- ffcall-1.10+2.41.orig/ffcall/avcall/avcall.h.in ++++ ffcall-1.10+2.41/ffcall/avcall/avcall.h.in +@@ -286,9 +286,11 @@ + #if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__) + __AV_REGISTER_STRUCT_RETURN = 1<<9, + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + __AV_FLOAT_1 = 1<<10, + __AV_FLOAT_2 = 1<<11, ++ __AV_DOUBLE_1 = 1<<12, ++ __AV_DOUBLE_2 = 1<<13, + #endif + + __AV_flag_for_broken_compilers_that_dont_like_trailing_commas +@@ -330,10 +332,11 @@ + __avword* iaptr; + __avword iargs[6]; + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + /* store the floating-point arguments in an extra array */ + int anum; +- double floatarg[2]; ++ float floatarg[2]; ++ double doublearg[2]; + #endif + #if defined(__mipsn32__) || defined(__mips64__) + /* store the floating-point arguments in an extra array */ +@@ -410,7 +413,7 @@ + #define __av_start1(LIST) \ + (LIST).aptr = &(LIST).args[0], + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + #define __av_start1(LIST) \ + (LIST).anum = 0, \ + (LIST).aptr = &(LIST).args[0], +@@ -569,7 +572,7 @@ + #define __av_start_struct3(LIST) \ + 0 + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + #define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ + ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4) + /* Test __AV_SMALL_STRUCT_RETURN instead of __AV_REGISTER_STRUCT_RETURN. */ +@@ -737,7 +740,7 @@ + /* `long long' fits in __avword. */ + #define av_longlong __av_word + #define av_ulonglong(LIST,VAL) __av_word(LIST,(unsigned long long)(VAL)) +-#elif defined(__i386__) || defined(__m68k__) || defined(__mips__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__hppa__) || defined(__arm__) || defined(__powerpc__) || defined(__m88k__) || defined(__convex__) || defined(__s390__) ++#elif defined(__i386__) || defined(__m68k__) || (defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__)) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__hppa__) || defined(__arm__) || defined(__powerpc__) || defined(__m88k__) || defined(__convex__) || defined(__s390__) + /* `long long's are passed embedded on the arg stack. */ + #define av_longlong(LIST,VAL) __av_longlong(LIST,long long,VAL) + #define av_ulonglong(LIST,VAL) __av_longlong(LIST,unsigned long long,VAL) +@@ -804,7 +807,7 @@ + + #endif + +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + + /* Up to 2 leading float or double non-varargs args can be passed in + * float registers, but we also push them into the corresponding int +@@ -815,22 +818,22 @@ + (++(LIST).aptr > __av_eptr(LIST) \ + ? -1 : ((++(LIST).anum == 1 \ + ? ((LIST).flags |= __AV_FLOAT_1, \ +- ((float*)(LIST).floatarg)[1] = ((float*)(LIST).aptr)[-1] = (float)(VAL))\ +- : (LIST).anum == 2 && ((LIST).flags & __AV_FLOAT_1) \ ++ (LIST).floatarg[0] = ((float*)(LIST).aptr)[-1] = (float)(VAL))\ ++ : (LIST).anum == 2 && (((LIST).flags & __AV_FLOAT_1) || ((LIST).flags & __AV_DOUBLE_1))\ + ? ((LIST).flags |= __AV_FLOAT_2, \ +- ((float*)(LIST).floatarg)[3] = ((float*)(LIST).aptr)[-1] = (float)(VAL))\ +- : (*(float*)&(LIST).aptr[-1] = (float)(VAL))), \ ++ (LIST).floatarg[1] = ((float*)(LIST).aptr)[-1] = (float)(VAL))\ ++ : (((float*)(LIST).aptr)[-1] = (float)(VAL))), \ + 0)) + + #define av_double(LIST,VAL) \ + (((LIST).aptr = (__avword*)(((__avword)(LIST).aptr+15)&-8)) \ + > __av_eptr(LIST) \ + ? -1 : ((++(LIST).anum == 1 \ +- ? ((LIST).flags |= __AV_FLOAT_1, \ +- (LIST).floatarg[0] = ((double*)(LIST).aptr)[-1] = (double)(VAL))\ +- : (LIST).anum == 2 && ((LIST).flags & __AV_FLOAT_1) \ +- ? ((LIST).flags |= __AV_FLOAT_2, \ +- (LIST).floatarg[1] = ((double*)(LIST).aptr)[-1] = (double)(VAL))\ ++ ? ((LIST).flags |= __AV_DOUBLE_1, \ ++ (LIST).doublearg[0] = ((double*)(LIST).aptr)[-1] = (double)(VAL))\ ++ : (LIST).anum == 2 && (((LIST).flags & __AV_FLOAT_1) || ((LIST).flags & __AV_DOUBLE_1))\ ++ ? ((LIST).flags |= __AV_DOUBLE_2, \ ++ (LIST).doublearg[1] = ((double*)(LIST).aptr)[-1] = (double)(VAL))\ + : (((double*)(LIST).aptr)[-1] = (double)(VAL))), \ + 0)) + +@@ -1132,7 +1135,7 @@ + 0))) + #endif + /* small structures < 1 word are adjusted depending on compiler */ +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + #define __av_struct_leftadjusted(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL) \ + (((LIST).aptr = \ + (__avword*)(((__avword)(LIST).aptr+(TYPE_SIZE)+(TYPE_ALIGN)-1) & -(long)(TYPE_ALIGN)))\ +--- ffcall-1.10+2.41.orig/ffcall/avcall/avcall-mips.S ++++ ffcall-1.10+2.41/ffcall/avcall/avcall-mips.S +@@ -1,418 +1,406 @@ +-#include "asmmips.h" + .file 1 "avcall-mips.c" +- .set nobopt ++ .section .mdebug.abi32 ++ .previous ++ .abicalls + .text + .align 2 + .globl __builtin_avcall +- DECLARE_FUNCTION(__builtin_avcall) +- +- .text +- .text + .ent __builtin_avcall ++ .type __builtin_avcall, @function + __builtin_avcall: +- .frame $fp,32,$31 +- .mask 0xc0010000,-8 ++ .frame $fp,96,$31 # vars= 56, regs= 3/0, args= 16, extra= 8 ++ .mask 0xd0000000,-8 + .fmask 0x00000000,0 +- subu $sp,$sp,32 +- sw $fp,20($sp) ++ .set noreorder ++ .cpload $25 ++ .set reorder ++ subu $sp,$sp,96 ++ .cprestore 16 ++ sw $31,88($sp) ++ sw $fp,84($sp) ++ sw $28,80($sp) + move $fp,$sp +- sw $31,24($sp) +- sw $16,16($sp) ++ sw $4,96($fp) + addu $sp,$sp,-1024 +- move $16,$4 +- move $4,$sp +- lw $3,20($16) +- lw $2,4($16) +- addu $3,$3,-48 +- subu $3,$3,$16 ++ addu $2,$sp,16 ++ sw $2,24($fp) ++ sw $sp,28($fp) ++ lw $2,96($fp) ++ lw $3,20($2) ++ lw $2,96($fp) ++ subu $2,$3,$2 ++ addu $2,$2,-56 ++ sra $2,$2,2 ++ sw $2,32($fp) ++ lw $2,96($fp) ++ lw $2,4($2) + andi $2,$2,0x400 +- .set noreorder +- .set nomacro ++ beq $2,$0,$L2 ++ lw $2,96($fp) ++#APP ++ l.s $f12,28($2) ++#NO_APP ++$L2: ++ lw $2,96($fp) ++ lw $2,4($2) ++ andi $2,$2,0x1000 + beq $2,$0,$L3 +- sra $3,$3,2 +- .set macro +- .set reorder +- +- +- l.d $f12,32($16) +- +- lw $2,4($16) +- +- andi $2,$2,0x800 +- .set noreorder +- .set nomacro +- beq $2,$0,$L65 +- li $6,4 +- .set macro +- .set reorder +- +- +- l.d $f14,40($16) +- ++ lw $2,96($fp) ++#APP ++ l.d $f12,40($2) ++#NO_APP + $L3: +- li $6,4 +-$L65: +- slt $2,$6,$3 +- .set noreorder +- .set nomacro +- beq $2,$0,$L6 +- addu $5,$4,16 +- .set macro +- .set reorder +- +- addu $4,$16,64 +- addu $6,$3,-4 +-$L8: +- lw $2,0($4) +- addu $4,$4,4 +- addu $6,$6,-1 +- sw $2,0($5) +- .set noreorder +- .set nomacro +- bne $6,$0,$L8 +- addu $5,$5,4 +- .set macro +- .set reorder +- ++ lw $2,96($fp) ++ lw $2,4($2) ++ andi $2,$2,0x800 ++ beq $2,$0,$L4 ++ lw $2,96($fp) ++ lw $2,4($2) ++ andi $2,$2,0x1400 ++ beq $2,$0,$L4 ++ lw $2,96($fp) ++#APP ++ l.s $f14,32($2) ++#NO_APP ++$L4: ++ lw $2,96($fp) ++ lw $2,4($2) ++ andi $2,$2,0x2000 ++ beq $2,$0,$L5 ++ lw $2,96($fp) ++ lw $2,4($2) ++ andi $2,$2,0x1400 ++ beq $2,$0,$L5 ++ lw $2,96($fp) ++#APP ++ l.d $f14,48($2) ++#NO_APP ++$L5: ++ li $2,4 # 0x4 ++ sw $2,36($fp) + $L6: +- lw $25,0($16) +- lw $4,48($16) +- lw $5,52($16) +- lw $6,56($16) +- lw $7,60($16) ++ lw $2,36($fp) ++ lw $3,32($fp) ++ slt $2,$2,$3 ++ bne $2,$0,$L9 ++ b $L7 ++$L9: ++ lw $2,36($fp) ++ sll $3,$2,2 ++ lw $2,28($fp) ++ addu $4,$3,$2 ++ lw $3,96($fp) ++ lw $2,36($fp) ++ sll $2,$2,2 ++ addu $2,$2,$3 ++ addu $2,$2,56 ++ lw $2,0($2) ++ sw $2,0($4) ++ lw $2,36($fp) ++ addu $2,$2,1 ++ sw $2,36($fp) ++ b $L6 ++$L7: ++ lw $2,96($fp) ++ lw $25,0($2) ++ lw $2,96($fp) ++ lw $3,96($fp) ++ lw $6,96($fp) ++ lw $7,96($fp) ++ lw $4,56($2) ++ lw $5,60($3) ++ lw $6,64($6) ++ lw $7,68($7) + jal $31,$25 +- move $6,$2 +- lw $4,12($16) +- li $2,1 +- .set noreorder +- .set nomacro +- beq $4,$2,$L64 +- move $2,$0 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$0,$L61 +- li $2,2 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L62 +- li $2,3 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L62 +- li $2,4 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L62 +- li $2,5 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L63 +- li $2,6 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L63 +- li $2,7 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L61 +- li $2,8 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L61 +- li $2,9 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L61 +- li $2,10 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- beq $4,$2,$L61 +- addu $2,$4,-11 +- .set macro +- .set reorder +- +- sltu $2,$2,2 +- .set noreorder +- .set nomacro +- beq $2,$0,$L32 +- li $2,13 +- .set macro +- .set reorder +- +- lw $2,8($16) +- +- sw $6,0($2) +- lw $4,8($16) +- .set noreorder +- .set nomacro +- j $L11 +- sw $3,4($4) +- .set macro +- .set reorder +- +-$L32: +- .set noreorder +- .set nomacro +- bne $4,$2,$L34 +- li $2,14 +- .set macro +- .set reorder +- +- lw $2,8($16) +- .set noreorder +- .set nomacro +- j $L11 ++ sw $2,40($fp) ++#ifdef _MIPSEB ++ sw $3,52($fp) ++#else ++ sw $3,48($fp) ++#endif ++ sra $2,$3,31 ++#ifdef _MIPSEB ++ sw $2,48($fp) ++#else ++ sw $2,52($fp) ++#endif ++ s.s $f0,56($fp) ++ s.d $f0,64($fp) ++ lw $2,96($fp) ++ sw $2,76($fp) ++ lw $3,76($fp) ++ lw $2,12($3) ++ sltu $2,$2,17 ++ beq $2,$0,$L10 ++ lw $3,76($fp) ++ lw $2,12($3) ++ sll $3,$2,2 ++ la $2,$L48 ++ addu $2,$3,$2 ++ lw $2,0($2) ++ .cpadd $2 ++ j $2 ++ .rdata ++ .align 2 ++$L48: ++ .gpword $L13 ++ .gpword $L10 ++ .gpword $L14 ++ .gpword $L15 ++ .gpword $L16 ++ .gpword $L17 ++ .gpword $L18 ++ .gpword $L19 ++ .gpword $L20 ++ .gpword $L21 ++ .gpword $L22 ++ .gpword $L24 ++ .gpword $L24 ++ .gpword $L25 ++ .gpword $L26 ++ .gpword $L27 ++ .gpword $L28 ++ .text ++$L13: ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++ b $L10 ++$L14: ++ lw $2,96($fp) ++ lw $3,8($2) ++#ifdef _MIPSEB ++ lbu $2,43($fp) ++#else ++ lbu $2,40($fp) ++#endif ++ sb $2,0($3) ++ b $L10 ++$L15: ++ lw $2,96($fp) ++ lw $3,8($2) ++#ifdef _MIPSEB ++ lbu $2,43($fp) ++#else ++ lbu $2,40($fp) ++#endif ++ sb $2,0($3) ++ b $L10 ++$L16: ++ lw $2,96($fp) ++ lw $3,8($2) ++#ifdef _MIPSEB ++ lbu $2,43($fp) ++#else ++ lbu $2,40($fp) ++#endif ++ sb $2,0($3) ++ b $L10 ++$L17: ++ lw $2,96($fp) ++ lw $3,8($2) ++#ifdef _MIPSEB ++ lhu $2,42($fp) ++#else ++ lhu $2,40($fp) ++#endif ++ sh $2,0($3) ++ b $L10 ++$L18: ++ lw $2,96($fp) ++ lw $3,8($2) ++#ifdef _MIPSEB ++ lhu $2,42($fp) ++#else ++ lhu $2,40($fp) ++#endif ++ sh $2,0($3) ++ b $L10 ++$L19: ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++ b $L10 ++$L20: ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++ b $L10 ++$L21: ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++ b $L10 ++$L22: ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++ b $L10 ++$L24: ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++ lw $2,96($fp) ++ lw $2,8($2) ++ addu $3,$2,4 ++#ifdef _MIPSEB ++ lw $2,52($fp) ++#else ++ lw $2,48($fp) ++#endif ++ sw $2,0($3) ++ b $L10 ++$L25: ++ lw $2,96($fp) ++ lw $2,8($2) ++ l.s $f0,56($fp) + s.s $f0,0($2) +- .set macro +- .set reorder +- +-$L34: +- .set noreorder +- .set nomacro +- bne $4,$2,$L36 +- li $2,15 +- .set macro +- .set reorder +- +- lw $2,8($16) +- ++ b $L10 ++$L26: ++ lw $2,96($fp) ++ lw $2,8($2) ++ l.d $f0,64($fp) + s.d $f0,0($2) +- .set noreorder +- .set nomacro +- j $L64 +- move $2,$0 +- .set macro +- .set reorder +- +-$L36: +- .set noreorder +- .set nomacro +- beq $4,$2,$L61 +- li $2,16 +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- bne $4,$2,$L64 +- move $2,$0 +- .set macro +- .set reorder +- +- lw $3,4($16) +- +- andi $2,$3,0x1 +- .set noreorder +- .set nomacro +- beq $2,$0,$L41 +- li $2,1 +- .set macro +- .set reorder +- +- lw $3,16($16) +- +- .set noreorder +- .set nomacro +- bne $3,$2,$L42 +- li $2,2 +- .set macro +- .set reorder +- +- lw $3,8($16) +- lbu $2,0($6) +- .set noreorder +- .set nomacro +- j $L11 ++ b $L10 ++$L27: ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++ b $L10 ++$L28: ++ lw $2,96($fp) ++ lw $2,4($2) ++ andi $2,$2,0x1 ++ beq $2,$0,$L29 ++ lw $2,96($fp) ++ lw $3,16($2) ++ li $2,1 # 0x1 ++ bne $3,$2,$L30 ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ lbu $2,0($2) + sb $2,0($3) +- .set macro +- .set reorder +- +-$L42: +- .set noreorder +- .set nomacro +- bne $3,$2,$L44 +- li $2,4 +- .set macro +- .set reorder +- +- lw $3,8($16) +- lhu $2,0($6) +- .set noreorder +- .set nomacro +- j $L11 ++ b $L10 ++$L30: ++ lw $2,96($fp) ++ lw $3,16($2) ++ li $2,2 # 0x2 ++ bne $3,$2,$L32 ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ lhu $2,0($2) + sh $2,0($3) +- .set macro +- .set reorder +- +-$L44: +- .set noreorder +- .set nomacro +- bne $3,$2,$L46 +- li $2,8 +- .set macro +- .set reorder +- +- lw $3,8($16) +- lw $2,0($6) +- .set noreorder +- .set nomacro +- j $L11 ++ b $L10 ++$L32: ++ lw $2,96($fp) ++ lw $3,16($2) ++ li $2,4 # 0x4 ++ bne $3,$2,$L34 ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ lw $2,0($2) + sw $2,0($3) +- .set macro +- .set reorder +- +-$L46: +- .set noreorder +- .set nomacro +- bne $3,$2,$L48 +- addu $2,$3,3 +- .set macro +- .set reorder +- +- lw $3,8($16) +- lw $2,0($6) +- ++ b $L10 ++$L34: ++ lw $2,96($fp) ++ lw $3,16($2) ++ li $2,8 # 0x8 ++ bne $3,$2,$L36 ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ lw $2,0($2) + sw $2,0($3) +- lw $4,8($16) +- lw $2,4($6) +- .set noreorder +- .set nomacro +- j $L11 +- sw $2,4($4) +- .set macro +- .set reorder +- +-$L48: +- srl $5,$2,2 +- addu $5,$5,-1 +- .set noreorder +- .set nomacro +- bltz $5,$L11 +- sll $2,$5,2 +- .set macro +- .set reorder +- +- addu $6,$2,$6 +-$L52: +- lw $2,0($6) +- addu $6,$6,-4 +- sll $3,$5,2 +- lw $4,8($16) +- addu $5,$5,-1 +- addu $3,$3,$4 +- .set noreorder +- .set nomacro +- bgez $5,$L52 ++ lw $2,96($fp) ++ lw $2,8($2) ++ addu $3,$2,4 ++ lw $2,40($fp) ++ addu $2,$2,4 ++ lw $2,0($2) + sw $2,0($3) +- .set macro +- .set reorder +- +- .set noreorder +- .set nomacro +- j $L64 +- move $2,$0 +- .set macro +- .set reorder +- +-$L41: +- andi $2,$3,0x2 +- .set noreorder +- .set nomacro +- beq $2,$0,$L11 +- li $2,1 +- .set macro +- .set reorder +- +- lw $3,16($16) +- +- .set noreorder +- .set nomacro +- bne $3,$2,$L56 +- li $2,2 +- .set macro +- .set reorder +- +-$L62: +- lw $2,8($16) +- .set noreorder +- .set nomacro +- j $L11 +- sb $6,0($2) +- .set macro +- .set reorder +- +-$L56: +- .set noreorder +- .set nomacro +- bne $3,$2,$L58 +- li $2,4 +- .set macro +- .set reorder +- +-$L63: +- lw $2,8($16) +- .set noreorder +- .set nomacro +- j $L11 +- sh $6,0($2) +- .set macro +- .set reorder +- +-$L58: +- .set noreorder +- .set nomacro +- bne $3,$2,$L64 +- move $2,$0 +- .set macro +- .set reorder +- +-$L61: +- lw $2,8($16) +- +- sw $6,0($2) +-$L11: ++ b $L10 ++$L36: ++ lw $2,96($fp) ++ lw $2,16($2) ++ addu $2,$2,3 ++ srl $2,$2,2 ++ sw $2,72($fp) ++$L38: ++ lw $2,72($fp) ++ addu $2,$2,-1 ++ sw $2,72($fp) ++ bgez $2,$L40 ++ b $L10 ++$L40: ++ lw $4,96($fp) ++ lw $2,72($fp) ++ sll $3,$2,2 ++ lw $2,8($4) ++ addu $4,$3,$2 ++ lw $2,72($fp) ++ sll $3,$2,2 ++ lw $2,40($fp) ++ addu $2,$3,$2 ++ lw $2,0($2) ++ sw $2,0($4) ++ b $L38 ++$L29: ++ lw $2,96($fp) ++ lw $2,4($2) ++ andi $2,$2,0x2 ++ beq $2,$0,$L10 ++ lw $2,96($fp) ++ lw $3,16($2) ++ li $2,1 # 0x1 ++ bne $3,$2,$L43 ++ lw $2,96($fp) ++ lw $3,8($2) ++#ifdef _MIPSEB ++ lbu $2,43($fp) ++#else ++ lbu $2,40($fp) ++#endif ++ sb $2,0($3) ++ b $L10 ++$L43: ++ lw $2,96($fp) ++ lw $3,16($2) ++ li $2,2 # 0x2 ++ bne $3,$2,$L45 ++ lw $2,96($fp) ++ lw $3,8($2) ++#ifdef _MIPSEB ++ lhu $2,42($fp) ++#else ++ lhu $2,40($fp) ++#endif ++ sh $2,0($3) ++ b $L10 ++$L45: ++ lw $2,96($fp) ++ lw $3,16($2) ++ li $2,4 # 0x4 ++ bne $3,$2,$L10 ++ lw $2,96($fp) ++ lw $3,8($2) ++ lw $2,40($fp) ++ sw $2,0($3) ++$L10: + move $2,$0 +-$L64: + move $sp,$fp +- lw $31,24($sp) +- lw $fp,20($sp) +- lw $16,16($sp) +- +- .set noreorder +- .set nomacro ++ lw $31,88($sp) ++ lw $fp,84($sp) ++ addu $sp,$sp,96 + j $31 +- addu $sp,$sp,32 +- .set macro +- .set reorder +- + .end __builtin_avcall ++ .ident "GCC: (GNU) 3.3.5 (Debian 1:3.3.5-8)" +--- ffcall-1.10+2.41.orig/ffcall/avcall/avcall-mips.c ++++ ffcall-1.10+2.41/ffcall/avcall/avcall-mips.c +@@ -3,6 +3,7 @@ + /** + Copyright 1993 Bill Triggs, + Copyright 1995-1999 Bruno Haible, ++ Copyright 2005 Thiemo Seufer + + This is free software distributed under the GNU General Public + Licence described in the file COPYING. Contact the author if +@@ -49,108 +50,122 @@ + int + __builtin_avcall(av_alist* l) + { +- register __avword* sp __asm__("$sp"); /* C names for registers */ +- register __avword iret2 __asm__("$3"); +- register float fret __asm__("$f0"); +- register double dret __asm__("$f0"); ++ register __avword* sp __asm__("$sp"); /* C names for registers */ ++ register __avword iret2_tmp __asm__("$3"); ++ register float fret_tmp __asm__("$f0"); ++ register double dret_tmp __asm__("$f0"); + __avword *space = __builtin_alloca(__AV_ALIST_WORDS * sizeof(__avword)); /* big space for child's stack frame */ + __avword *argframe = (__avword*)sp; /* stack offset for argument list is 0 */ + int arglen = l->aptr - l->args; +- __avword i; +- +- if (l->flags & __AV_FLOAT_1) /* push leading float args */ +- { +- __asm__("l.d $f12,%1(%0)" : : "p" (l), "i" OFFSETOF(av_alist,floatarg[0])); +- if (l->flags & __AV_FLOAT_2) +- __asm__("l.d $f14,%1(%0)" : : "p" (l), "i" OFFSETOF(av_alist,floatarg[1])); +- } ++ int i; ++ __avword iret; ++ long long iret2; ++ float fret; ++ double dret; ++ ++ /* load leading float args */ ++ if (l->flags & __AV_FLOAT_1) ++ __asm__("l.s $f12,%1(%0)" : : "p" (l), "i" OFFSETOF(av_alist,floatarg[0])); ++ if (l->flags & __AV_DOUBLE_1) ++ __asm__("l.d $f12,%1(%0)" : : "p" (l), "i" OFFSETOF(av_alist,doublearg[0])); ++ if ((l->flags & __AV_FLOAT_2) && (l->flags & (__AV_FLOAT_1 | __AV_DOUBLE_1))) ++ __asm__("l.s $f14,%1(%0)" : : "p" (l), "i" OFFSETOF(av_alist,floatarg[1])); ++ if ((l->flags & __AV_DOUBLE_2) && (l->flags & (__AV_FLOAT_1 | __AV_DOUBLE_1))) ++ __asm__("l.d $f14,%1(%0)" : : "p" (l), "i" OFFSETOF(av_alist,doublearg[1])); + + for (i = 4; i < arglen; i++) /* push excess function args */ + argframe[i] = l->args[i]; + +- i = (*(t9 = l->func))(l->args[0], l->args[1], /* call function with 1st 4 args */ +- l->args[2], l->args[3]); ++ iret = (*(t9 = l->func))(l->args[0], l->args[1], /* call function with 1st 4 args */ ++ l->args[2], l->args[3]); ++ iret2 = iret2_tmp; ++ fret = fret_tmp; ++ dret = dret_tmp; + + /* save return value */ +- if (l->rtype == __AVvoid) { +- } else +- if (l->rtype == __AVword) { +- RETURN(__avword, i); +- } else +- if (l->rtype == __AVchar) { +- RETURN(char, i); +- } else +- if (l->rtype == __AVschar) { +- RETURN(signed char, i); +- } else +- if (l->rtype == __AVuchar) { +- RETURN(unsigned char, i); +- } else +- if (l->rtype == __AVshort) { +- RETURN(short, i); +- } else +- if (l->rtype == __AVushort) { +- RETURN(unsigned short, i); +- } else +- if (l->rtype == __AVint) { +- RETURN(int, i); +- } else +- if (l->rtype == __AVuint) { +- RETURN(unsigned int, i); +- } else +- if (l->rtype == __AVlong) { +- RETURN(long, i); +- } else +- if (l->rtype == __AVulong) { +- RETURN(unsigned long, i); +- } else +- if (l->rtype == __AVlonglong || l->rtype == __AVulonglong) { +- ((__avword*)l->raddr)[0] = i; ++ switch (l->rtype) { ++ default: ++ case __AVvoid: ++ break; ++ case __AVword: ++ RETURN(__avword, iret); ++ break; ++ case __AVchar: ++ RETURN(char, iret); ++ break; ++ case __AVschar: ++ RETURN(signed char, iret); ++ break; ++ case __AVuchar: ++ RETURN(unsigned char, iret); ++ break; ++ case __AVshort: ++ RETURN(short, iret); ++ break; ++ case __AVushort: ++ RETURN(unsigned short, iret); ++ break; ++ case __AVint: ++ RETURN(int, iret); ++ break; ++ case __AVuint: ++ RETURN(unsigned int, iret); ++ break; ++ case __AVlong: ++ RETURN(long, iret); ++ break; ++ case __AVulong: ++ RETURN(unsigned long, iret); ++ break; ++ case __AVlonglong: ++ case __AVulonglong: ++ ((__avword*)l->raddr)[0] = (__avword)(iret); + ((__avword*)l->raddr)[1] = iret2; +- } else +- if (l->rtype == __AVfloat) { ++ break; ++ case __AVfloat: + RETURN(float, fret); +- } else +- if (l->rtype == __AVdouble) { ++ break; ++ case __AVdouble: + RETURN(double, dret); +- } else +- if (l->rtype == __AVvoidp) { +- RETURN(void*, i); +- } else +- if (l->rtype == __AVstruct) { ++ break; ++ case __AVvoidp: ++ RETURN(void*, (__avword)iret); ++ break; ++ case __AVstruct: + if (l->flags & __AV_PCC_STRUCT_RETURN) { + /* pcc struct return convention: need a *(TYPE*)l->raddr = *(TYPE*)i; */ + if (l->rsize == sizeof(char)) { +- RETURN(char, *(char*)i); ++ RETURN(char, *(char*)(__avword)iret); + } else + if (l->rsize == sizeof(short)) { +- RETURN(short, *(short*)i); ++ RETURN(short, *(short*)(__avword)iret); + } else + if (l->rsize == sizeof(int)) { +- RETURN(int, *(int*)i); ++ RETURN(int, *(int*)(__avword)iret); + } else + if (l->rsize == sizeof(double)) { +- ((int*)l->raddr)[0] = ((int*)i)[0]; +- ((int*)l->raddr)[1] = ((int*)i)[1]; ++ ((int*)l->raddr)[0] = ((int*)(__avword)iret)[0]; ++ ((int*)l->raddr)[1] = ((int*)(__avword)iret)[1]; + } else { + int n = (l->rsize + sizeof(__avword)-1)/sizeof(__avword); + while (--n >= 0) +- ((__avword*)l->raddr)[n] = ((__avword*)i)[n]; ++ ((__avword*)l->raddr)[n] = ((__avword*)(__avword)iret)[n]; + } + } else { + /* normal struct return convention */ + if (l->flags & __AV_SMALL_STRUCT_RETURN) { + if (l->rsize == sizeof(char)) { +- RETURN(char, i); ++ RETURN(char, iret); + } else + if (l->rsize == sizeof(short)) { +- RETURN(short, i); ++ RETURN(short, iret); + } else + if (l->rsize == sizeof(int)) { +- RETURN(int, i); ++ RETURN(int, iret); + } + } + } ++ break; + } + return 0; + } +--- ffcall-1.10+2.41.orig/ffcall/callback/trampoline_r/Makefile.in ++++ ffcall-1.10+2.41/ffcall/callback/trampoline_r/Makefile.in +@@ -99,6 +99,9 @@ + cache-alpha.lo : $(srcdir)/cache-alpha.s + $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/cache-alpha.s + ++cache-arm.lo : $(srcdir)/cache-arm.s ++ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/cache-arm.s ++ + cache-hppa.lo : $(srcdir)/cache-hppa.s + $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/cache-hppa.s + +--- ffcall-1.10+2.41.orig/ffcall/callback/trampoline_r/configure.in ++++ ffcall-1.10+2.41/ffcall/callback/trampoline_r/configure.in +@@ -43,7 +43,7 @@ + *) ;; + esac + fi +-if test ${host_cpu_abi} = sparc -o ${host_cpu_abi} = sparc64 -o ${host_cpu_abi} = alpha -o ${host_cpu_abi} = hppa -o ${host_cpu_abi} = convex; then ++if test ${host_cpu_abi} = sparc -o ${host_cpu_abi} = sparc64 -o ${host_cpu_abi} = alpha -o ${host_cpu_abi} = hppa -o ${host_cpu_abi} = convex -o ${host_cpu_abi} = arm; then + CPU_OBJECTS="$CPU_OBJECTS "'cache-$(CPU).lo' + fi + if test ${host_cpu_abi} = powerpc; then +--- ffcall-1.10+2.41.orig/ffcall/callback/trampoline_r/cache-arm.c ++++ ffcall-1.10+2.41/ffcall/callback/trampoline_r/cache-arm.c +@@ -0,0 +1,16 @@ ++/* Instruction cache flushing for arm */ ++ ++/* ++ * Copyright 1997 Bruno Haible, ++ * ++ * This is free software distributed under the GNU General Public Licence ++ * described in the file COPYING. Contact the author if you don't have this ++ * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied, ++ * on this software. ++ */ ++#include ++ ++void __TR_clear_cache (char *first_addr, char *last_addr) ++{ ++ asm volatile ("swi %0" : : "i" (__ARM_NR_cacheflush)); ++} +--- ffcall-1.10+2.41.orig/ffcall/callback/trampoline_r/trampoline.c ++++ ffcall-1.10+2.41/ffcall/callback/trampoline_r/trampoline.c +@@ -240,11 +240,7 @@ + #define TRAMP_LENGTH 14 + #define TRAMP_ALIGN 16 + #endif +-#if defined(__mips__) && !defined(__mipsn32__) +-#define TRAMP_LENGTH 24 +-#define TRAMP_ALIGN 4 +-#endif +-#ifdef __mipsn32__ ++#if defined(__mips__) || defined(__mipsn32__) && !defined(__mips64__) + #define TRAMP_LENGTH 24 + #define TRAMP_ALIGN 4 + #endif +@@ -278,7 +274,7 @@ + #define TRAMP_BIAS 2 + #endif + #ifdef __arm__ +-#define TRAMP_LENGTH 32 ++#define TRAMP_LENGTH 16 + #define TRAMP_ALIGN 4 + #endif + #ifdef __powerpcsysv4__ +@@ -467,41 +463,7 @@ + #define tramp_data(function) \ + *(long *) (function + 2) + #endif +-#if defined(__mips__) && !defined(__mipsn32__) +- /* function: +- * li $2,&0xffff0000 3C 02 hi16() +- * ori $2,$2,&0xffff 34 42 lo16() +- * li $25,
&0xffff0000 3C 19 hi16(
) +- * ori $25,$25,
&0xffff 37 39 lo16(
) +- * j $25 03 20 00 08 +- * nop 00 00 00 00 +- */ +- /* What about big endian / little endian ?? */ +- *(short *) (function + 0) = 0x3C02; +- *(short *) (function + 2) = (unsigned long) data >> 16; +- *(short *) (function + 4) = 0x3442; +- *(short *) (function + 6) = (unsigned long) data & 0xffff; +- *(short *) (function + 8) = 0x3C19; +- *(short *) (function +10) = (unsigned long) address >> 16; +- *(short *) (function +12) = 0x3739; +- *(short *) (function +14) = (unsigned long) address & 0xffff; +- *(long *) (function +16) = 0x03200008; +- *(long *) (function +20) = 0x00000000; +-#define is_tramp(function) \ +- *(unsigned short *) (function + 0) == 0x3C02 && \ +- *(unsigned short *) (function + 4) == 0x3442 && \ +- *(unsigned short *) (function + 8) == 0x3C19 && \ +- *(unsigned short *) (function +12) == 0x3739 && \ +- *(unsigned long *) (function +16) == 0x03200008 && \ +- *(unsigned long *) (function +20) == 0x00000000 +-#define hilo(hiword,loword) \ +- (((unsigned long) (hiword) << 16) | (unsigned long) (loword)) +-#define tramp_address(function) \ +- hilo(*(unsigned short *) (function +10), *(unsigned short *) (function +14)) +-#define tramp_data(function) \ +- hilo(*(unsigned short *) (function + 2), *(unsigned short *) (function + 6)) +-#endif +-#ifdef __mipsn32__ ++#if defined(__mips__) || defined(__mipsn32__) && !defined(__mips64__) + /* function: + * lw $2,16($25) 8F 22 00 10 + * lw $25,20($25) 8F 39 00 14 +@@ -510,7 +472,6 @@ + * .word + * .word
+ */ +- /* What about big endian / little endian ?? */ + *(unsigned int *) (function + 0) = 0x8F220010; + *(unsigned int *) (function + 4) = 0x8F390014; + *(unsigned int *) (function + 8) = 0x03200008; +@@ -518,10 +479,10 @@ + *(unsigned int *) (function +16) = (unsigned int) data; + *(unsigned int *) (function +20) = (unsigned int) address; + #define is_tramp(function) \ +- *(int *) (function + 0) == 0x8F220010 && \ +- *(int *) (function + 4) == 0x8F390014 && \ +- *(int *) (function + 8) == 0x03200008 && \ +- *(int *) (function +12) == 0x00000000 ++ *(unsigned int *) (function + 0) == 0x8F220010 && \ ++ *(unsigned int *) (function + 4) == 0x8F390014 && \ ++ *(unsigned int *) (function + 8) == 0x03200008 && \ ++ *(unsigned int *) (function +12) == 0x00000000 + #define tramp_address(function) \ + *(unsigned int *) (function +20) + #define tramp_data(function) \ +@@ -605,14 +566,17 @@ + * .dword + * .dword
+ */ +- /* What about big endian / little endian ?? */ +- *(long *) (function + 0) = 0xDF220010DF390018L; +- *(long *) (function + 8) = 0x0320000800000000L; ++ *(unsigned int *) (function + 0) = 0xDF220010; ++ *(unsigned int *) (function + 4) = 0xDF390018; ++ *(unsigned int *) (function + 8) = 0x03200008; ++ *(unsigned int *) (function +12) = 0x00000000; + *(unsigned long *) (function +16) = (unsigned long) data; + *(unsigned long *) (function +24) = (unsigned long) address; + #define is_tramp(function) \ +- *(long *) (function + 0) == 0xDF220010DF390018L && \ +- *(long *) (function + 8) == 0x0320000800000000L ++ *(unsigned int *) (function + 0) == 0xDF220010 && \ ++ *(unsigned int *) (function + 4) == 0xDF390018 && \ ++ *(unsigned int *) (function + 8) == 0x03200008 && \ ++ *(unsigned int *) (function +12) == 0x00000000 + #define tramp_address(function) \ + *(unsigned long *) (function +24) + #define tramp_data(function) \ +@@ -788,37 +752,26 @@ + #endif + #ifdef __arm__ + /* function: +- * ldr ip,[pc,#_function-.-8] E59FC014 +- * ldr ip,[ip,#0] E59CC000 ??Is this correct?? +- * stmfd sp!,{ip} E92D1000 +- * ldr ip,[pc,#_data-.-8] E59FC004 +- * ldr ip,[ip,#0] E59CC000 ??Is this correct?? +- * ldmfd sp!,{pc}^ E8FD8000 ++ * add r12,pc,#8 E28FC008 ++ * ldr pc,[pc] E59FF000 + * _data: +- * .word ++ * .word + * _function: +- * .word
++ * .word
+ */ +- { static long code [6] = +- { 0xE59FC014, 0xE59CC000, 0xE92D1000, 0xE59FC004, +- 0xE59CC000, 0xE8FD8000 +- }; +- int i; +- for (i=0; i<6; i++) { ((long *) function)[i] = code[i]; } +- ((long *) function)[6] = (long) data; +- ((long *) function)[7] = (long) address; ++ { ++ ((long *) function)[0] = 0xE28FC008; ++ ((long *) function)[1] = 0xE59FF000; ++ ((long *) function)[2] = (long) data; ++ ((long *) function)[3] = (long) address; + } + #define is_tramp(function) \ +- ((long *) function)[0] == 0xE59FC014 && \ +- ((long *) function)[1] == 0xE59CC000 && \ +- ((long *) function)[2] == 0xE92D1000 && \ +- ((long *) function)[3] == 0xE59FC004 && \ +- ((long *) function)[4] == 0xE59CC000 && \ +- ((long *) function)[5] == 0xE8FD8000 ++ ((long *) function)[0] == 0xE28FC004 && \ ++ ((long *) function)[1] == 0xE51FF004 + #define tramp_address(function) \ +- ((long *) function)[7] ++ ((long *) function)[3] + #define tramp_data(function) \ +- ((long *) function)[6] ++ ((long *) function)[2] + #endif + #ifdef __powerpcsysv4__ + #ifdef __NetBSD__ +@@ -1175,7 +1128,7 @@ + __TR_clear_cache(function,function+TRAMP_LENGTH-1); + #endif + #ifdef __arm__ +- /* This CPU does not have a separate instruction cache. (I think.) */ ++ __TR_clear_cache(function,function+TRAMP_LENGTH); + #endif + #if defined(__powerpc__) && !defined(__powerpc64__) + __TR_clear_cache(function); +--- ffcall-1.10+2.41.orig/ffcall/callback/trampoline_r/cache-arm.s ++++ ffcall-1.10+2.41/ffcall/callback/trampoline_r/cache-arm.s +@@ -0,0 +1,15 @@ ++ .file "cache-arm.c" ++ .text ++ .align 2 ++ .global __TR_clear_cache ++ .type __TR_clear_cache, %function ++__TR_clear_cache: ++ @ args = 0, pretend = 0, frame = 0 ++ @ frame_needed = 0, uses_anonymous_args = 0 ++ @ link register save eliminated. ++ @ lr needed for prologue ++#APP ++ swi #10420226 ++ mov pc, lr ++ .size __TR_clear_cache, .-__TR_clear_cache ++ .ident "GCC: (GNU) 3.4.0 (Debian 20040516)" +--- ffcall-1.10+2.41.orig/ffcall/callback/trampoline_r/tramp-arm.s ++++ ffcall-1.10+2.41/ffcall/callback/trampoline_r/tramp-arm.s +@@ -22,19 +22,15 @@ + _tramp: + @ Immediate constants are a problem. I take the indirect load approach + @ because I don't want 4 instructions for each constant. +- ldr ip,[pc,#_function-.-8] +- ldr ip,[ip,#0] +- stmfd sp!,{ip} +- ldr ip,[pc,#_data-.-8] +- ldr ip,[ip,#0] +- ldmfd sp!,{pc}^ ++ add ip,pc,#8 ++ ldr pc,[pc] + + .global _data + .align 0 + _data: + .word 0x73554711 + +- .global _function + .align 0 + _function: + .word 0xbabebec0 ++ .global _function +--- ffcall-1.10+2.41.orig/ffcall/callback/trampoline_r/tramp-mips.s ++++ ffcall-1.10+2.41/ffcall/callback/trampoline_r/tramp-mips.s +@@ -17,12 +17,12 @@ + .globl tramp + .ent tramp + tramp: +- li $2,0x73550000 +- ori $2,$2,0x4711 +- li $25,0xbabe0000 +- ori $25,$25,0xbec0 ++ /* We can assume that our own address (=tramp) is in $25. */ ++ lw $2,$LC0-tramp($25) ++ lw $25,$LC1-tramp($25) + /* The called function expects to see its own address in $25. */ + j $25 +- /* Some Mips hardware running Irix-4.0.5 needs this nop. */ +- nop ++ nop ++$LC0: .word 0x73554711 ++$LC1: .word 0xbabebec0 + .end tramp +--- ffcall-1.10+2.41.orig/ffcall/callback/vacall_r/vacall_r.h.in ++++ ffcall-1.10+2.41/ffcall/callback/vacall_r/vacall_r.h.in +@@ -288,7 +288,7 @@ + #if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__) + __VA_REGISTER_STRUCT_RETURN = 1<<10, + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + __VA_FLOAT_1 = 1<<11, + __VA_FLOAT_2 = 1<<12, + #endif +@@ -352,7 +352,7 @@ + float farg[4]; + double darg[2]; + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + int anum; + float farg[2]; + double darg[2]; +@@ -502,11 +502,11 @@ + #define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE) \ + 0 + #endif +-#if defined(__mips__) && !defined(__mipsn32__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__m88k__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__m88k__) + #define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ + ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4) + /* Test __VA_SMALL_STRUCT_RETURN instead of __VA_REGISTER_STRUCT_RETURN. */ +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + #define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE) \ + ((LIST)->anum++, \ + 0 \ +@@ -614,7 +614,7 @@ + /* Padding of non-struct arguments. */ + #define __va_argsize(TYPE_SIZE) \ + (((TYPE_SIZE) + sizeof(__vaword)-1) & -(long)sizeof(__vaword)) +-#if defined(__i386__) || defined(__m68k__) || defined(__mips__) && !defined(__mipsn32__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__) && (defined(_AIX) || (defined(__MACH__) && defined(__APPLE__)))) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) ++#if defined(__i386__) || defined(__m68k__) || defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__) && (defined(_AIX) || (defined(__MACH__) && defined(__APPLE__)))) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) + /* args grow up */ + /* small structures < 1 word are adjusted depending on compiler */ + #define __va_arg_leftadjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ +@@ -700,20 +700,26 @@ + (LIST)->aptr + ((-(TYPE_SIZE)) & 3) \ + ) + #endif +-#if defined(__i386__) || defined(__alpha__) || defined(__ia64__) ++#if defined(__i386__) || defined(__alpha__) || defined(__ia64__) || ((defined(__mipsn32__) || defined(__mips64__)) && defined(_MIPSEL)) + /* little endian -> small args < 1 word are adjusted to the left */ + #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ + __va_arg_leftadjusted(LIST,TYPE_SIZE,TYPE_ALIGN) + #endif +-#if defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__s390__) ++#if defined(__m68k__) || ((defined(__mipsn32__) || defined(__mips64__)) && defined(_MIPSEB)) || defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__s390__) + /* big endian -> small args < 1 word are adjusted to the right */ + #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ + __va_arg_rightadjusted(LIST,TYPE_SIZE,TYPE_ALIGN) + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) ++#ifdef _MIPSEB + /* big endian -> small args < 1 word are adjusted to the right */ + #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ + ((LIST)->anum++, __va_arg_rightadjusted(LIST,TYPE_SIZE,TYPE_ALIGN)) ++#else /* _MIPSEL */ ++/* little endian -> small args < 1 word are adjusted to the left */ ++#define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ ++ ((LIST)->anum++, __va_arg_leftadjusted(LIST,TYPE_SIZE,TYPE_ALIGN)) ++#endif + #endif + #if defined(__x86_64__) + /* the first 6 argument words are passed in registers */ +@@ -785,7 +791,7 @@ + #if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__) + #define __va_align_double(LIST) + #endif +-#if defined(__mips__) && !defined(__mipsn32__) || defined(__m88k__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) || defined(__m88k__) + /* __VA_alignof(double) > sizeof(__vaword) */ + #define __va_align_double(LIST) \ + (LIST)->aptr = ((LIST)->aptr + sizeof(double)-1) & -(long)sizeof(double), +@@ -850,7 +856,7 @@ + )) + #endif + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + /* The first 0,1,2 registers are stored elsewhere if they are floating-point + * parameters. + */ +@@ -1065,7 +1071,7 @@ + __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ + ) + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + /* small structures < 1 word are adjusted depending on compiler */ + #define __va_arg_struct(LIST,TYPE_SIZE,TYPE_ALIGN) \ + (__va_align_struct(LIST,TYPE_SIZE,TYPE_ALIGN) \ +--- ffcall-1.10+2.41.orig/ffcall/m4/general.m4 ++++ ffcall-1.10+2.41/ffcall/m4/general.m4 +@@ -138,7 +138,7 @@ + host_cpu_instructionset=arm + ;; + changequote([,])dnl +- mips ) ++ mips* ) + AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [ + AC_EGREP_CPP(yes, + [#if defined(_MIPS_SZLONG) +@@ -151,6 +151,8 @@ + ]) + if test $cl_cv_host_mips64 = yes; then + host_cpu_instructionset=mips64 ++else ++ host_cpu_instructionset=mips + fi + ;; + dnl On powerpc64 systems, the C compiler may still be generating 32-bit code. +@@ -234,7 +236,7 @@ + host_cpu_abi=arm + ;; + changequote([,])dnl +- mips ) ++ mips* ) + AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [ + AC_EGREP_CPP(yes, + [#if defined(_MIPS_SZLONG) +--- ffcall-1.10+2.41.orig/ffcall/trampoline/configure.in ++++ ffcall-1.10+2.41/ffcall/trampoline/configure.in +@@ -37,7 +37,7 @@ + *) ;; + esac + fi +-if test ${host_cpu_abi} = sparc -o ${host_cpu_abi} = sparc64 -o ${host_cpu_abi} = alpha -o ${host_cpu_abi} = hppa -o ${host_cpu_abi} = convex; then ++if test ${host_cpu_abi} = sparc -o ${host_cpu_abi} = sparc64 -o ${host_cpu_abi} = alpha -o ${host_cpu_abi} = hppa -o ${host_cpu_abi} = convex -o ${host_cpu_abi} = arm; then + CPU_OBJECTS="$CPU_OBJECTS "'cache-$(CPU).o' + fi + if test ${host_cpu_abi} = powerpc; then +--- ffcall-1.10+2.41.orig/ffcall/trampoline/cache-arm.c ++++ ffcall-1.10+2.41/ffcall/trampoline/cache-arm.c +@@ -0,0 +1,16 @@ ++/* Instruction cache flushing for arm */ ++ ++/* ++ * Copyright 1997 Bruno Haible, ++ * ++ * This is free software distributed under the GNU General Public Licence ++ * described in the file COPYING. Contact the author if you don't have this ++ * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied, ++ * on this software. ++ */ ++#include ++ ++void __TR_clear_cache (char *first_addr, char *last_addr) ++{ ++ asm volatile ("swi %0" : : "i" (__ARM_NR_cacheflush)); ++} +--- ffcall-1.10+2.41.orig/ffcall/trampoline/trampoline.c ++++ ffcall-1.10+2.41/ffcall/trampoline/trampoline.c +@@ -278,7 +278,7 @@ + #define TRAMP_BIAS 2 + #endif + #ifdef __arm__ +-#define TRAMP_LENGTH 44 ++#define TRAMP_LENGTH 36 + #define TRAMP_ALIGN 4 + #endif + #ifdef __powerpcsysv4__ +@@ -855,46 +855,43 @@ + #endif + #ifdef __arm__ + /* function: +- * stmfd sp!,{r0} E92D0001 +- * ldr r0,[pc,#_data-.-8] E59F0014 +- * ldr ip,[r0,#0] E590C000 +- * ldr r0,[pc,#_variable-.-8] E59F0010 +- * str ip,[r0,#0] E580C000 +- * ldmfd sp!,{r0}^ E8FD0001 +- * ldr ip,[pc,#_function-.-8] E59FC008 +- * ldr pc,[ip,#0] E59CF000 ++ * stmfd sp!,{r0} E92D0001 ++ * ldr r0,[pc,#16] E59F000C ++ * ldr ip,[pc,#16] E59FC00C ++ * str r0,[ip] E58C0000 ++ * ldmfd sp!,{r0} E8BD0001 ++ * ldr pc,[pc,#4] E59FF004 + * _data: +- * .word ++ * .word + * _variable: +- * .word ++ * .word + * _function: +- * .word
++ * .word
+ */ +- { static long code [8] = +- { 0xE92D0001, 0xE59F0014, 0xE590C000, 0xE59F0010, +- 0xE580C000, 0xE8FD0001, 0xE59FC008, 0xE59CF000 +- }; +- int i; +- for (i=0; i<8; i++) { ((long *) function)[i] = code[i]; } +- ((long *) function)[8] = (long) data; +- ((long *) function)[9] = (long) variable; +- ((long *) function)[10] = (long) address; ++ { ++ ((long *) function)[0] = 0xE92D0001; ++ ((long *) function)[1] = 0xE59F000C; ++ ((long *) function)[2] = 0xE59FC00C; ++ ((long *) function)[3] = 0xE58C0000; ++ ((long *) function)[4] = 0xE8BD0001; ++ ((long *) function)[5] = 0xE59FF004; ++ ((long *) function)[6] = (long)data; ++ ((long *) function)[7] = (long)variable; ++ ((long *) function)[8] = (long)address; + } + #define is_tramp(function) \ +- ((long *) function)[0] == 0xE92D0001 && \ +- ((long *) function)[1] == 0xE59F0014 && \ +- ((long *) function)[2] == 0xE590C000 && \ +- ((long *) function)[3] == 0xE59F0010 && \ +- ((long *) function)[4] == 0xE580C000 && \ +- ((long *) function)[5] == 0xE8FD0001 && \ +- ((long *) function)[6] == 0xE59FC008 && \ +- ((long *) function)[7] == 0xE59CF000 ++ ((long *) function)[0] == 0xE92D0001 && \ ++ ((long *) function)[1] == 0xE59F000C && \ ++ ((long *) function)[2] == 0xE59FC00C && \ ++ ((long *) function)[3] == 0xE58C0000 && \ ++ ((long *) function)[4] == 0xE8BD0001 && \ ++ ((long *) function)[5] == 0xE59FF004 + #define tramp_address(function) \ +- ((long *) function)[10] ++ ((long *) function)[8] + #define tramp_variable(function) \ +- ((long *) function)[9] ++ ((long *) function)[7] + #define tramp_data(function) \ +- ((long *) function)[8] ++ ((long *) function)[6] + #endif + #ifdef __powerpcsysv4__ + /* function: +@@ -1286,7 +1283,7 @@ + __TR_clear_cache(function,function+TRAMP_LENGTH-1); + #endif + #ifdef __arm__ +- /* This CPU does not have a separate instruction cache. (I think.) */ ++ __TR_clear_cache(function,function+TRAMP_LENGTH); + #endif + #if defined(__powerpc__) && !defined(__powerpc64__) + __TR_clear_cache(function); +--- ffcall-1.10+2.41.orig/ffcall/trampoline/cache-arm.s ++++ ffcall-1.10+2.41/ffcall/trampoline/cache-arm.s +@@ -0,0 +1,15 @@ ++ .file "cache-arm.c" ++ .text ++ .align 2 ++ .global __TR_clear_cache ++ .type __TR_clear_cache, %function ++__TR_clear_cache: ++ @ args = 0, pretend = 0, frame = 0 ++ @ frame_needed = 0, uses_anonymous_args = 0 ++ @ link register save eliminated. ++ @ lr needed for prologue ++#APP ++ swi #10420226 ++ mov pc, lr ++ .size __TR_clear_cache, .-__TR_clear_cache ++ .ident "GCC: (GNU) 3.4.0 (Debian 20040516)" +--- ffcall-1.10+2.41.orig/ffcall/trampoline/tramp-arm.s ++++ ffcall-1.10+2.41/ffcall/trampoline/tramp-arm.s +@@ -23,13 +23,11 @@ + @ Immediate constants are a problem. I take the indirect load approach + @ because I don't want 4 instructions for each constant. + stmfd sp!,{r0} +- ldr r0,[pc,#_data-.-8] +- ldr ip,[r0,#0] +- ldr r0,[pc,#_variable-.-8] +- str ip,[r0,#0] +- ldmfd sp!,{r0}^ +- ldr ip,[pc,#_function-.-8] +- ldr pc,[ip,#0] ++ ldr r0,[pc,#12] ++ ldr ip,[pc,#12] ++ str r0,[ip] ++ ldmfd sp!,{r0} ++ ldr pc,[pc,#4] + + .global _data + .align 0 +--- ffcall-1.10+2.41.orig/ffcall/vacall/vacall.h.in ++++ ffcall-1.10+2.41/ffcall/vacall/vacall.h.in +@@ -289,7 +289,7 @@ + #if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__) + __VA_REGISTER_STRUCT_RETURN = 1<<10, + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + __VA_FLOAT_1 = 1<<11, + __VA_FLOAT_2 = 1<<12, + #endif +@@ -353,7 +353,7 @@ + float farg[4]; + double darg[2]; + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + int anum; + float farg[2]; + double darg[2]; +@@ -503,11 +503,11 @@ + #define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE) \ + 0 + #endif +-#if defined(__mips__) && !defined(__mipsn32__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__m88k__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__m88k__) + #define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ + ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4) + /* Test __VA_SMALL_STRUCT_RETURN instead of __VA_REGISTER_STRUCT_RETURN. */ +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + #define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE) \ + ((LIST)->anum++, \ + 0 \ +@@ -615,7 +615,7 @@ + /* Padding of non-struct arguments. */ + #define __va_argsize(TYPE_SIZE) \ + (((TYPE_SIZE) + sizeof(__vaword)-1) & -(long)sizeof(__vaword)) +-#if defined(__i386__) || defined(__m68k__) || defined(__mips__) && !defined(__mipsn32__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__) && (defined(_AIX) || (defined(__MACH__) && defined(__APPLE__)))) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) ++#if defined(__i386__) || defined(__m68k__) || defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__) && (defined(_AIX) || (defined(__MACH__) && defined(__APPLE__)))) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) + /* args grow up */ + /* small structures < 1 word are adjusted depending on compiler */ + #define __va_arg_leftadjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ +@@ -711,7 +711,7 @@ + #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ + __va_arg_rightadjusted(LIST,TYPE_SIZE,TYPE_ALIGN) + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + /* big endian -> small args < 1 word are adjusted to the right */ + #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ + ((LIST)->anum++, __va_arg_rightadjusted(LIST,TYPE_SIZE,TYPE_ALIGN)) +@@ -786,7 +786,7 @@ + #if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__) + #define __va_align_double(LIST) + #endif +-#if defined(__mips__) && !defined(__mipsn32__) || defined(__m88k__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) || defined(__m88k__) + /* __VA_alignof(double) > sizeof(__vaword) */ + #define __va_align_double(LIST) \ + (LIST)->aptr = ((LIST)->aptr + sizeof(double)-1) & -(long)sizeof(double), +@@ -851,7 +851,7 @@ + )) + #endif + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + /* The first 0,1,2 registers are stored elsewhere if they are floating-point + * parameters. + */ +@@ -1066,7 +1066,7 @@ + __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN) \ + ) + #endif +-#if defined(__mips__) && !defined(__mipsn32__) ++#if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__) + /* small structures < 1 word are adjusted depending on compiler */ + #define __va_arg_struct(LIST,TYPE_SIZE,TYPE_ALIGN) \ + (__va_align_struct(LIST,TYPE_SIZE,TYPE_ALIGN) \