Blob Blame Raw
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.12-75) unstable; urgency=medium
 .
   * Version_2_6_13pre65
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-03-23

--- gcl-2.6.12.orig/cmpnew/gcl_cmpmulti.lsp
+++ gcl-2.6.12/cmpnew/gcl_cmpmulti.lsp
@@ -164,27 +164,21 @@
 		(cmpwarn "~A was proclaimed to have only one return value. ~%;But you appear to want multiple values." fname))))))
 		
 (defun c2multiple-value-setq (vrefs form &aux top-data)
-    (multiple-value-check vrefs form)
+  (multiple-value-check vrefs form)
   (let ((*value-to-go* 'top)*top-data*)
     (c2expr* form) (setq top-data *top-data*))
   (and *record-call-info* (record-call-info nil (car top-data)))
+  (wt-nl "if(vs_base>vs_top) vs_top=vs_base;*vs_top=Cnil;")
   (do ((vs vrefs (cdr vs)))
       ((endp vs))
-      (declare (object vs))
       (let ((vref (car vs)))
-           (declare (object vref))
-           (wt-nl "if(vs_base<vs_top){")
-           (set-var 'fun-val (car vref) (cadr vref))
-           (unless (endp (cdr vs)) (wt-nl "vs_base++;"))
-           (wt-nl "}else{") (set-var nil (car vref) (cadr vref))
-           (wt "}"))
-      )
+	(set-var 'fun-val (car vref) (cadr vref))
+	(unless (endp (cdr vs)) (wt-nl "if(vs_base<vs_top) vs_base++;"))))
   (cond ((null vrefs)
-         (wt-nl "if(vs_base=vs_top){vs_base[0]=Cnil;vs_top=vs_base+1;}")
+         (wt-nl "if(vs_base==vs_top){vs_base[0]=Cnil;vs_top=vs_base+1;}")
          (unwind-exit 'fun-val))
         (t (unless (eq *exit* 'return) (wt-nl) (reset-top))
-           (unwind-exit (cons 'var (car vrefs)))))
-  )
+           (unwind-exit (cons 'var (car vrefs))))))
 
 (defun c1multiple-value-bind (args &aux (info (make-info))
                                    (vars nil) (vnames nil) init-form
--- gcl-2.6.12.orig/configure
+++ gcl-2.6.12/configure
@@ -4121,6 +4121,7 @@ $as_echo_n "checking working gprof... "
 		       s390*) enableval="no";;#mcount smashes float args in make_shortfloat 20180313
 		       sh4*)  enableval="no";;
 		       ia64*) enableval="no";;
+		       alpha*) enableval="no";;#write_stub currently depends on t12 set in call
 		       hppa*) enableval="no";;
 		       arm*)  enableval="no";;#FIXME mcount compiled as a 24/22 bit reloc even with -mlong-calls, marginally accessible
 		       aarch64*) enableval="no";;#unreproducible buildd bug 20170824
@@ -4132,7 +4133,9 @@ $as_echo "disabled" >&6; }
 		   else
 		       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
-     		       assert_arg_to_cflags -pg
+		       OLD_CFLAGS=$CFLAGS  # Do not run configure tests with -pg
+                       assert_arg_to_cflags -pg
+		       CFLAGS=$OLD_CFLAGS
        		       TFPFLAG=""
 
 $as_echo "#define GCL_GPROF 1" >>confdefs.h
--- gcl-2.6.12.orig/configure.in
+++ gcl-2.6.12/configure.in
@@ -334,6 +334,7 @@ AC_ARG_ENABLE([gprof],[  --enable-gprof
 		       s390*) enableval="no";;#mcount smashes float args in make_shortfloat 20180313
 		       sh4*)  enableval="no";;
 		       ia64*) enableval="no";;
+		       alpha*) enableval="no";;#write_stub currently depends on t12 set in call
 		       hppa*) enableval="no";;
 		       arm*)  enableval="no";;#FIXME mcount compiled as a 24/22 bit reloc even with -mlong-calls, marginally accessible
 		       aarch64*) enableval="no";;#unreproducible buildd bug 20170824
@@ -343,25 +344,11 @@ AC_ARG_ENABLE([gprof],[  --enable-gprof
 		       AC_MSG_RESULT([disabled])
 		   else
 		       AC_MSG_RESULT([ok])
-     		       assert_arg_to_cflags -pg
+		       OLD_CFLAGS=$CFLAGS  # Do not run configure tests with -pg
+                       assert_arg_to_cflags -pg
+		       CFLAGS=$OLD_CFLAGS
        		       TFPFLAG=""
 		       AC_DEFINE(GCL_GPROF,1,[use gprof profiling])
-dnl 		       AC_MSG_CHECKING([for text start])
-dnl 		       echo 'int main () {return(0);}' >foo.c
-dnl 		       $CC foo.c -o foo
-dnl 		       GCL_GPROF_START=`nm foo | $AWK  '/  *[[TD]]  *__*start$/ {print $NF}'` # D for ppc64 -- FIXME custreloc
-dnl 		       rm -f foo.c foo
-dnl 		       if test "$GCL_GPROF_START" != "" ; then
-dnl 			   AC_MSG_RESULT($GCL_GPROF_START)
-dnl 			   AC_DEFINE_UNQUOTED(GCL_GPROF_START,$GCL_GPROF_START,[starting address for gprof])
-dnl 			   assert_arg_to_cflags -pg
-dnl #			   case $use in
-dnl #			       s390*) ;; # relocation truncation bug in gcc
-dnl #			       *) TLIBS="$TLIBS -pg";;
-dnl #			   esac
-dnl        			   TFPFLAG=""
-dnl 			   AC_DEFINE(GCL_GPROF,1,[use gprof profiling])
-dnl 		       fi
 		   fi
 	       fi])
 
--- gcl-2.6.12.orig/o/usig.c
+++ gcl-2.6.12/o/usig.c
@@ -150,7 +150,7 @@ DEFUN_NEW("FLD",object,fSfld,SI,1,1,NONE
 
 /* For now ignore last three args governing offsets and data modification, just to
    support fpe sync with master*/
-DEFUN_NEW("*FIXNUM",object,fSAfixnum,SI,4,4,NONE,OI,OO,OO,OO,(fixnum addr,object x,object y,object z),"") {
+DEFUN_NEW("*FIXNUM",object,fSAfixnum,SI,4,4,NONE,II,OO,OO,OO,(fixnum addr,object x,object y,object z),"") {
   RETURN1((object)*(fixnum *)addr);
 }
 DEFUN_NEW("*FLOAT",object,fSAfloat,SI,4,4,NONE,OI,OO,OO,OO,(fixnum addr,object x,object y,object z),"") {