From 697bbc50ef0ca97a2332228997901148c4c27deb Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 24 Feb 2017 16:03:34 -0700 Subject: [PATCH] Update to latest mercurial snapshot. Also: - Drop upstreamed -32bit patch. - Add -volatile, -negshift, and -alias patches. --- .gitignore | 1 + clisp-32bit.patch | 22 ----- clisp-alias.patch | 11 +++ clisp-arm.patch | 15 +--- clisp-db.patch | 10 +-- clisp-format.patch | 22 ++--- clisp-libsvm.patch | 4 +- clisp-linux.patch | 4 +- clisp-negshift.patch | 121 +++++++++++++++++++++++++++ clisp-volatile.patch | 193 +++++++++++++++++++++++++++++++++++++++++++ clisp.spec | 21 +++-- sources | 2 +- 12 files changed, 365 insertions(+), 61 deletions(-) delete mode 100644 clisp-32bit.patch create mode 100644 clisp-alias.patch create mode 100644 clisp-negshift.patch create mode 100644 clisp-volatile.patch diff --git a/.gitignore b/.gitignore index b8a4618..0e4ff61 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /clisp-2.49-20130208hg.tar.bz2 /clisp-2.49-20161111hg.tar.xz /clisp-2.49-20161113hg.tar.xz +/clisp-2.49-20170224hg.tar.xz diff --git a/clisp-32bit.patch b/clisp-32bit.patch deleted file mode 100644 index a9ef63e..0000000 --- a/clisp-32bit.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/lispbibl.d.orig 2017-01-28 11:49:38.000000000 -0700 -+++ src/lispbibl.d 2017-01-28 14:35:20.257552567 -0700 -@@ -1421,7 +1421,6 @@ typedef SLONG sint32; /* signed 32 bi - #define intLsize 32 - typedef signed_int_with_n_bits(intLsize) sintL; - typedef unsigned_int_with_n_bits(intLsize) uintL; --#if (long_bitsize==64) || defined(DECALPHA) || defined(MIPS64) || defined(SPARC64) || defined(IA64) || defined(AMD64) - /* Machine has real 64-bit integers in hardware. */ - #define intQsize 64 - typedef signed_int_with_n_bits(intQsize) sintQ; -@@ -1440,11 +1439,6 @@ typedef SLONG sint32; /* signed 32 bi - #define minus_bitQm(n) (-(sintQ)2<<((n)-1)) - typedef sintQ sintL2; - typedef uintQ uintL2; --#else -- /* Emulate 64-Bit-numbers using two 32-Bit-numbers. */ -- typedef struct { sintL hi; uintL lo; } sintL2; /* signed 64 Bit integer */ -- typedef struct { uintL hi; uintL lo; } uintL2; /* unsigned 64 Bit integer */ --#endif - /* Use 'uintX' and 'sintX' for Integers with approximately given width - and a minumum of storage space. */ - %% sprintf(buf,"sint%d",intBsize); emit_typedef(buf,"sintB"); diff --git a/clisp-alias.patch b/clisp-alias.patch new file mode 100644 index 0000000..ed7913c --- /dev/null +++ b/clisp-alias.patch @@ -0,0 +1,11 @@ +--- src/record.d.orig 2017-02-24 10:42:57.482011489 -0700 ++++ src/record.d 2017-02-24 10:52:21.862184109 -0700 +@@ -1540,7 +1540,7 @@ global maygc object update_instance (obj + ptr->inst_class_version = obj; + clr_break_sem_1(); /* permit interrupts again */ + } +- ASSERT(Record_flags(STACK_(2+4+2*kept_slots)) & instflags_forwarded_B); ++ ASSERT(record_flags(TheInstance(STACK_(2+4+2*kept_slots))) & instflags_forwarded_B); + dotimesL(kept_slots,kept_slots, { + var object new_slotinfo = popSTACK(); + ASSERT(atomp(new_slotinfo)); diff --git a/clisp-arm.patch b/clisp-arm.patch index cf06b21..1bbaacd 100644 --- a/clisp-arm.patch +++ b/clisp-arm.patch @@ -1,5 +1,5 @@ ---- src/ariarm.d.orig 2017-01-28 11:49:37.957965080 -0700 -+++ src/ariarm.d 2017-01-28 11:54:14.913643784 -0700 +--- src/ariarm.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/ariarm.d 2017-02-24 10:41:46.898615218 -0700 @@ -86,7 +86,7 @@ pc .req r15 #define C(x) x @@ -854,14 +854,3 @@ #endif END ---- src/makemake.in.orig 2017-01-28 11:49:37.905965491 -0700 -+++ src/makemake.in 2017-01-28 11:54:14.914643775 -0700 -@@ -1602,7 +1602,7 @@ if [ "$cpu" = hppa ] ; then - ARI_ASMD=$ARI_ASMD' arihppa' - ARI_ASMS=$ARI_ASMS' arihppa' - fi --if [ "$cpu" = arm ] ; then -+if [ "$cpu" = arm -o "$cpu" = armel ] ; then - ARI_ASMD=$ARI_ASMD' ariarm' - ARI_ASMS=$ARI_ASMS' ariarm' - fi diff --git a/clisp-db.patch b/clisp-db.patch index fcae5eb..60c9495 100644 --- a/clisp-db.patch +++ b/clisp-db.patch @@ -1,6 +1,6 @@ ---- modules/berkeley-db/configure.orig 2017-01-28 11:49:37.845965965 -0700 -+++ modules/berkeley-db/configure 2017-01-28 11:54:31.794501872 -0700 -@@ -5214,7 +5214,7 @@ if ${ac_cv_dbe_set_errcall_accept_dbe+:} +--- modules/berkeley-db/configure.orig 2017-02-24 10:37:24.000000000 -0700 ++++ modules/berkeley-db/configure 2017-02-24 10:42:31.636232558 -0700 +@@ -5297,7 +5297,7 @@ if ${ac_cv_dbe_set_errcall_accept_dbe+:} else CFLAGS_save="$CFLAGS" @@ -9,8 +9,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ---- modules/berkeley-db/configure.in.orig 2017-01-28 11:49:37.847965949 -0700 -+++ modules/berkeley-db/configure.in 2017-01-28 11:54:31.792501889 -0700 +--- modules/berkeley-db/configure.in.orig 2017-02-24 10:37:24.000000000 -0700 ++++ modules/berkeley-db/configure.in 2017-02-24 10:42:31.636232558 -0700 @@ -48,7 +48,7 @@ dnl set_errcall() accepts DBE], ac_cv_dbe_set_errcall_accept_dbe,[ diff --git a/clisp-format.patch b/clisp-format.patch index 24d7f52..6ac77ef 100644 --- a/clisp-format.patch +++ b/clisp-format.patch @@ -1,5 +1,5 @@ ---- src/errunix.d.orig 2017-01-28 11:49:37.885965649 -0700 -+++ src/errunix.d 2017-01-28 11:53:49.848854498 -0700 +--- src/errunix.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/errunix.d 2017-02-24 10:41:33.217732236 -0700 @@ -94,7 +94,7 @@ global _Noreturn void OS_error_arg (obje > FILE: Filename (with quotation marks) as constant ASCIZ-String > LINE: line number */ @@ -9,9 +9,9 @@ var object code = ANSIC_error_code_converter(errorcode); if (symbolp(code)) { /* known name? */ fputs(" (",stderr); ---- src/lispbibl.d.orig 2017-01-28 11:49:38.039964433 -0700 -+++ src/lispbibl.d 2017-01-28 11:53:49.864854363 -0700 -@@ -1012,7 +1012,7 @@ +--- src/lispbibl.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/lispbibl.d 2017-02-24 10:41:33.223732185 -0700 +@@ -1013,7 +1013,7 @@ #endif typedef unsigned char UBYTE; #else @@ -20,7 +20,7 @@ #endif #if (short_bitsize==16) typedef short SWORD; -@@ -1023,26 +1023,36 @@ +@@ -1024,26 +1024,36 @@ #if (long_bitsize==32) typedef long SLONG; typedef unsigned long ULONG; @@ -57,7 +57,7 @@ #else /* useless type */ #undef HAVE_LONG_LONG_INT #endif -@@ -1684,10 +1694,14 @@ typedef unsigned_int_with_n_bits(intBWLs +@@ -1685,10 +1695,14 @@ typedef unsigned_int_with_n_bits(intBWLs #if (intCsize==intWsize) #define dotimesC dotimesW #define dotimespC dotimespW @@ -72,8 +72,8 @@ #endif /* Use 'uintC' for counters, which are small most of the time. */ %% export_def(uintC); ---- src/spvw_debug.d.orig 2017-01-28 11:49:37.970964978 -0700 -+++ src/spvw_debug.d 2017-01-28 11:53:49.866854346 -0700 +--- src/spvw_debug.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/spvw_debug.d 2017-02-24 10:41:33.224732176 -0700 @@ -81,7 +81,7 @@ local void nobject_out1 (FILE* out, obje fputc('"',out); } else if (charp(obj)) { @@ -132,8 +132,8 @@ STACK_item_count(top_of_back_trace_frame(bt), top_of_back_trace_frame(bt->bt_next)), (((long)((char*)(bt->bt_next) - (char*)bt) ^ SPoffset) - SPoffset) ---- src/spvw_memfile.d.orig 2017-01-28 11:49:38.051964338 -0700 -+++ src/spvw_memfile.d 2017-01-28 11:53:49.867854338 -0700 +--- src/spvw_memfile.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/spvw_memfile.d 2017-02-24 10:41:33.225732167 -0700 @@ -1817,7 +1817,7 @@ local void loadmem_from_handle (Handle h (uintL)posfixnum_to_V(header._dumptime.seconds)); #endif diff --git a/clisp-libsvm.patch b/clisp-libsvm.patch index deb980e..a037801 100644 --- a/clisp-libsvm.patch +++ b/clisp-libsvm.patch @@ -1,5 +1,5 @@ ---- modules/libsvm/libsvm.lisp.orig 2016-11-11 08:56:50.341694018 -0700 -+++ modules/libsvm/libsvm.lisp 2016-11-11 09:05:19.341553889 -0700 +--- modules/libsvm/libsvm.lisp.orig 2017-02-24 10:37:24.000000000 -0700 ++++ modules/libsvm/libsvm.lisp 2017-02-24 10:42:20.857324755 -0700 @@ -31,7 +31,7 @@ (c-lines " #if !defined(HAVE_SVM_DESTROY_MODEL) diff --git a/clisp-linux.patch b/clisp-linux.patch index af09c8f..8f8c760 100644 --- a/clisp-linux.patch +++ b/clisp-linux.patch @@ -1,5 +1,5 @@ ---- modules/bindings/glibc/linux.lisp.orig 2016-11-11 08:56:50.548677286 -0700 -+++ modules/bindings/glibc/linux.lisp 2016-11-11 09:08:51.751465279 -0700 +--- modules/bindings/glibc/linux.lisp.orig 2017-02-24 10:37:24.000000000 -0700 ++++ modules/bindings/glibc/linux.lisp 2017-02-24 10:42:45.491114052 -0700 @@ -294,6 +294,8 @@ ;; for robust mutexes (def-c-const EOWNERDEAD (:documentation "Owner died")) ; 130 diff --git a/clisp-negshift.patch b/clisp-negshift.patch new file mode 100644 index 0000000..65f8576 --- /dev/null +++ b/clisp-negshift.patch @@ -0,0 +1,121 @@ +--- src/aridecl.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/aridecl.d 2017-02-24 10:43:07.072929454 -0700 +@@ -163,9 +163,9 @@ + /* Creates a single float from sign (0 or -1), exponent and mantissa: */ + #define make_FF(sign,exp,mant) \ + type_data_object(FF_type | (bit(vorz_bit_t) & (sign)), \ +- (ffloat)((sign) << (FF_exp_len+FF_mant_len) \ +- | (((exp) & (bit(FF_exp_len)-1)) << FF_mant_len) \ +- | ((mant) & (bit(FF_mant_len)-1)))) ++ (ffloat)(((unsigned int)(sign)) << (FF_exp_len+FF_mant_len) \ ++ | ((((unsigned int)exp) & (bit(FF_exp_len)-1)) << FF_mant_len) \ ++ | (((unsigned int)mant) & (bit(FF_mant_len)-1)))) + /* Single Float 0.0 : */ + #define FF_0 make_FF(0,0,0) + /* Single Float 1.0 : */ +--- src/lispbibl.d.orig 2017-02-24 10:42:57.481011497 -0700 ++++ src/lispbibl.d 2017-02-24 10:43:07.078929402 -0700 +@@ -1203,9 +1203,9 @@ typedef signed int signean; + #endif + #endif + /* Minus bit number n (0<=n<32) */ +-#define minus_bit(n) (-1L<<(n)) ++#define minus_bit(n) ((long)(((unsigned long)-1L)<<(n))) + /* Minus bit number n (0 delta: a constant + < result: incremented fixnum */ + #define fixnum_inc(obj,delta) \ +- objectplus(obj, (soint)(delta) << oint_data_shift) ++ objectplus(obj, (oint)(delta) << oint_data_shift) + %% export_def(fixnum_inc(obj,delta)); + + /* posfixnum(x) is a fixnum with value x>=0. */ +--- src/spvw_gcmark.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/spvw_gcmark.d 2017-02-24 10:43:07.078929402 -0700 +@@ -43,7 +43,7 @@ local void gc_mark (object obj) + goto down; /* and descent */ \ + } + #define up_varobject(first_offset) \ +- { curr = objectplus(pred,-(soint)(first_offset)<<(oint_addr_shift-addr_shift)); /* becomes current object */ \ ++ { curr = objectplus(pred,((oint)-(soint)(first_offset))<<(oint_addr_shift-addr_shift)); /* becomes current object */ \ + pred = prepred; goto up; /* go further up */ \ + } + #define down_nopointers(The) \ +@@ -68,7 +68,7 @@ local void gc_mark (object obj) + goto down; /* and descent */ \ + } + #define up_iarray() \ +- { curr = objectplus(pred,-(soint)iarray_data_offset<<(oint_addr_shift-addr_shift)); /* array becomes current object */ \ ++ { curr = objectplus(pred,((oint)-(soint)iarray_data_offset)<<(oint_addr_shift-addr_shift)); /* array becomes current object */ \ + pred = prepred; goto up; /* go further up */ \ + } + #define down_sistring() \ +@@ -88,7 +88,7 @@ local void gc_mark (object obj) + goto down; /* and descent */ \ + } + #define up_sistring() \ +- { curr = objectplus(pred,-(soint)sistring_data_offset<<(oint_addr_shift-addr_shift)); /* array becomes current object */ \ ++ { curr = objectplus(pred,((oint)-(soint)sistring_data_offset)<<(oint_addr_shift-addr_shift)); /* array becomes current object */ \ + pred = prepred; goto up; /* go further up */ \ + } + #define down_svector() \ +@@ -114,7 +114,7 @@ local void gc_mark (object obj) + goto down; /* and descent */ \ + }} + #define up_svector() \ +- { curr = objectplus(pred,-(soint)offsetofa(svector_,data)<<(oint_addr_shift-addr_shift)); /* Svector becomes current object */ \ ++ { curr = objectplus(pred,((oint)-(soint)offsetofa(svector_,data))<<(oint_addr_shift-addr_shift)); /* Svector becomes current object */ \ + pred = prepred; goto up; /* go further up */ \ + } + #define down_lrecord() \ +@@ -140,7 +140,7 @@ local void gc_mark (object obj) + goto down; /* and descent */ \ + }} + #define up_lrecord() \ +- { curr = objectplus(pred,-(soint)offsetofa(record_,recdata)<<(oint_addr_shift-addr_shift)); /* Lrecord becomes current object */ \ ++ { curr = objectplus(pred,((oint)-(soint)offsetofa(record_,recdata))<<(oint_addr_shift-addr_shift)); /* Lrecord becomes current object */ \ + pred = prepred; goto up; /* go further up */ \ + } + #define down_sxrecord() \ +@@ -177,7 +177,7 @@ local void gc_mark (object obj) + #define down_cclosure() + #endif + #define up_sxrecord() \ +- { curr = objectplus(pred,-(soint)offsetofa(record_,recdata)<<(oint_addr_shift-addr_shift)); /* record becomes current object */ \ ++ { curr = objectplus(pred,((oint)-(soint)offsetofa(record_,recdata))<<(oint_addr_shift-addr_shift)); /* record becomes current object */ \ + pred = prepred; goto up; /* go further up */ \ + } + #ifdef STANDARD_HEAPCODES +@@ -348,7 +348,7 @@ local void gc_mark (object obj) + curr = currently marked object, store in *pred */ + var object prepred = *(gcv_object_t*)ThePointer(pred); /* old predecessor */ + *(gcv_object_t*)ThePointer(pred) = curr; /* write back component */ +- pred = objectplus(pred,-(soint)(sizeof(gcv_object_t))<<(oint_addr_shift-addr_shift)); /* go to next component */ ++ pred = objectplus(pred,((oint)-(soint)sizeof(gcv_object_t))<<(oint_addr_shift-addr_shift)); /* go to next component */ + if (marked(ThePointer(pred))) { /* already marked? */ + curr = /* next component, without mark */ + without_mark_bit(*(gcv_object_t*)ThePointer(pred)); +@@ -383,7 +383,7 @@ local void gc_mark (object obj) + case_subr: /* SUBR */ + up_sxrecord(); + case_sstring: /* simple-string */ +- { var object pred_ = objectplus(pred,-(soint)sistring_data_offset<<(oint_addr_shift-addr_shift)); ++ { var object pred_ = objectplus(pred,((oint)-(soint)sistring_data_offset)<<(oint_addr_shift-addr_shift)); + if (sstring_reallocatedp(TheSstring(pred_))) + up_sistring(); + } diff --git a/clisp-volatile.patch b/clisp-volatile.patch new file mode 100644 index 0000000..79a857e --- /dev/null +++ b/clisp-volatile.patch @@ -0,0 +1,193 @@ +--- src/control.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/control.d 2017-02-24 10:42:57.475011548 -0700 +@@ -1591,7 +1591,7 @@ LISPFUN(maplap,seclass_default,2,0,rest, + + LISPSPECFORM(tagbody, 0,0,body) + { /* (TAGBODY {tag | statement}), CLTL p. 130 */ +- var object body = popSTACK(); ++ var volatile object body = popSTACK(); + { /* build GENV-frame: */ + var gcv_object_t* top_of_frame = STACK; /* pointer to frame */ + pushSTACK(aktenv.go_env); +--- src/eval.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/eval.d 2017-02-24 10:42:57.479011514 -0700 +@@ -710,10 +710,10 @@ global void throw_to (object tag) { + global maygc void invoke_handlers (object cond) { + /* Also deactivates the handler being called, and all newer handlers. + the handler-ranges, which are screened off: */ +- var stack_range_t* other_ranges = inactive_handlers; ++ var stack_range_t* volatile other_ranges = inactive_handlers; + var stack_range_t new_range; + /* Search for Handler-Frame, that handles a Type with (TYPEP cond type): */ +- var gcv_object_t* FRAME = STACK; ++ var gcv_object_t* volatile FRAME = STACK; + while (1) { + /* search in Stack starting at FRAME for a suitable HANDLER-Frame: */ + if (!(other_ranges == NULL) && (FRAME == other_ranges->low_limit)) { +@@ -726,7 +726,7 @@ global maygc void invoke_handlers (objec + if (framecode(FRAME_(0)) == HANDLER_frame_info) { /* Handler-Frame? */ + /* loop over types of the vectors #(type1 label1 ... typem labelm): */ + var uintL m2 = Svector_length(Car(FRAME_(frame_handlers))); /* 2*m */ +- var uintL i = 0; ++ var volatile uintL i = 0; + do { + pushSTACK(cond); /* save cond */ + pushSTACK(cond); +@@ -2398,7 +2398,7 @@ local maygc void trace_call (object fun, + /* But ':ALLOW-OTHER-KEYS NIL' hides a subsequent ':ALLOW-OTHER-KEYS T' \ + (see CLHS 3.4.1.4.1.1). */ \ + var bool allow_hidden = false; /* true if seen ':ALLOW-OTHER-KEYS NIL' */ \ +- var uintC check_count=argcount; \ ++ var volatile uintC check_count=argcount; \ + while (check_count--) { \ + var object kw = NEXT(argptr); /* next Argument */ \ + var object val = NEXT(argptr); /* and value for it */ \ +@@ -2441,7 +2441,7 @@ local maygc void trace_call (object fun, + > found_statement: what is to be done, if value found */ + #define find_keyword_value(notfound_statement,found_statement) \ + { var gcv_object_t* argptr = rest_args_pointer; \ +- var uintC find_count; \ ++ var volatile uintC find_count; \ + dotimesC(find_count,argcount, { \ + if (eq(NEXT(argptr),keyword)) goto kw_found; /* right keyword? */ \ + argptr skipSTACKop -1; /* NEXT */ \ +@@ -2460,8 +2460,9 @@ local maygc void trace_call (object fun, + < mv_count/mv_space: values + < STACK: cleaned up, = args_pointer + can trigger GC */ +-local maygc Values funcall_iclosure (object closure, gcv_object_t* args_pointer, +- uintC argcount) ++local maygc Values funcall_iclosure (volatile object closure, ++ gcv_object_t* args_pointer, ++ volatile uintC argcount) + { + /* 1st step: finish building of APPLY-frame: */ + var sp_jmp_buf my_jmp_buf; +@@ -2649,7 +2650,7 @@ local maygc Values funcall_iclosure (obj + pushSTACK(NIL); /* start of list */ + if (argcount>0) { + var gcv_object_t* ptr = args_pointer STACKop -(uintP)argcount; +- var uintC count; ++ var volatile uintC count; + dotimespC(count,argcount, { + var object new_cons = allocate_cons(); + Car(new_cons) = BEFORE(ptr); +@@ -2664,7 +2665,7 @@ local maygc Values funcall_iclosure (obj + /* process &KEY-parameters: */ + if (!numberp(TheIclosure(closure)->clos_keywords)) { + /* Keyword-parameters present */ +- var gcv_object_t* rest_args_pointer = args_pointer; ++ var gcv_object_t* volatile rest_args_pointer = args_pointer; + /* argcount = number of remaining arguments */ + /* halve argcount --> number of pairs Key.Value: */ + if (argcount%2) { /* number was odd -> not paired: */ +@@ -2936,7 +2937,7 @@ local Values eval_ffunction (object fun) + > form: form + < mv_count/mv_space: values + can trigger GC */ +-modexp maygc Values eval (object form) ++modexp maygc Values eval (volatile object form) + { + start: + /* Test for Keyboard-Interrupt: */ +@@ -2991,7 +2992,7 @@ modexp maygc Values eval (object form) + > form: Form + < mv_count/mv_space: values + can trigger GC */ +-global maygc Values eval_no_hooks (object form) { ++global maygc Values eval_no_hooks (volatile object form) { + var sp_jmp_buf my_jmp_buf; + /* build EVAL-Frame: */ + { +@@ -5734,7 +5735,8 @@ local maygc Values funcall_closure (obje + #define GOTO_ERROR(label) goto label + #define DEBUG_CHECK_BYTEPTR(b) do{}while(0) + #endif +-local /*maygc*/ Values interpret_bytecode_ (object closure_in, Sbvector codeptr, ++local /*maygc*/ Values interpret_bytecode_ (volatile object closure_in, ++ volatile Sbvector codeptr, + const uintB* byteptr_in) + { + GCTRIGGER_IF(true, { +@@ -5763,7 +5765,7 @@ local /*maygc*/ Values interpret_bytecod + #endif + TRACE_CALL(closure,'B','C'); + /* situate closure in STACK, below the arguments: */ +- var gcv_object_t* closureptr = (pushSTACK(closure), &STACK_0); ++ var gcv_object_t* volatile closureptr = (pushSTACK(closure), &STACK_0); + #ifndef FAST_SP + /* If there is no fast SP-Access, one has to introduce + an extra pointer: */ +--- src/lispbibl.d.orig 2017-02-24 10:41:33.223732185 -0700 ++++ src/lispbibl.d 2017-02-24 10:42:57.481011497 -0700 +@@ -9103,7 +9103,7 @@ All other long words on the LISP-Stack a + #define FAST_SP + #endif + #elif defined(GNU) && defined(SP_register) +- register __volatile__ aint __SP __asm__(SP_register); ++ register aint __SP __asm__(SP_register); + #ifdef SPARC64 + #define SP() (__SP+2048) + #else +--- src/record.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/record.d 2017-02-24 10:42:57.482011489 -0700 +@@ -1406,7 +1406,7 @@ LISPFUNNR(punbound,0) { /* not Foldable + > obj: the same CLOS instance, not a forward pointer + < result: the same CLOS instance, not a forward pointer + can trigger GC */ +-global maygc object update_instance (object user_obj, object obj) { ++global maygc object update_instance (object user_obj, volatile object obj) { + /* Note about the handling of multiple consecutive class redefinitions: + When there are multiple class redefinitions before an instance gets to + be updated, we call UPDATE-INSTANCE-FOR-REDEFINED-CLASS once for each +--- src/spvw.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/spvw.d 2017-02-24 10:42:57.482011489 -0700 +@@ -3466,7 +3466,7 @@ local inline void main_actions (struct a + var gcv_object_t* top_of_frame = STACK; /* pointer over frame */ + var sp_jmp_buf returner; /* return point */ + var const char* const* fileptr = &p->argv_init_files[0]; +- var uintL count = p->argv_init_filecount; ++ var volatile uintL count = p->argv_init_filecount; + finish_entry_frame(DRIVER,returner,,goto done_driver_init_files;); + do { + pushSTACK(asciz_to_string(*fileptr++,O(misc_encoding))); +@@ -3484,8 +3484,8 @@ local inline void main_actions (struct a + if (p->argv_compile_filecount > 0) { + var gcv_object_t* top_of_frame = STACK; /* pointer over frame */ + var sp_jmp_buf returner; /* return point */ +- var const argv_compile_file_t* fileptr = &p->argv_compile_files[0]; +- var uintL count = p->argv_compile_filecount; ++ var const argv_compile_file_t* volatile fileptr = &p->argv_compile_files[0]; ++ var volatile uintL count = p->argv_compile_filecount; + finish_entry_frame(DRIVER,returner,,goto done_driver_compile_files;); + do { + var uintC argcount = 1; +--- src/stream.d.orig 2017-02-24 10:37:24.000000000 -0700 ++++ src/stream.d 2017-02-24 10:42:57.484011471 -0700 +@@ -5839,7 +5839,7 @@ local maygc void clear_output_unbuffered + close_ochannel(stream, abort); + > stream : Channel-Stream + > abort: flag: non-0 => ignore errors */ +-local maygc void close_ochannel (object stream, uintB abort) { ++local maygc void close_ochannel (volatile object stream, uintB abort) { + pushSTACK(stream); + MAYBE_IGNORE_ERRORS(abort,oconv_unshift_output_unbuffered(stream)); + stream = STACK_0; +@@ -8325,7 +8325,7 @@ local void closed_buffered (object strea + > stream : File-Stream. + > abort: flag: non-0 => ignore errors + changed in stream: all Components except name and truename */ +-local maygc void close_buffered (object stream, uintB abort) { ++local maygc void close_buffered (volatile object stream, uintB abort) { + /* Handle=NIL (Stream already closed) -> finished: */ + if (nullp(BufferedStream_channel(stream))) + return; +@@ -9310,7 +9310,7 @@ local maygc char** lisp_completion (char + } + sstring_un_realloc(m); + var uintL charcount = Sstring_length(m); +- var const chart* ptr1; ++ var const chart* volatile ptr1; + unpack_sstring_alloca(m,charcount,0, ptr1=); + { /* (CATCH 'SYS::CONVERSION-FAILURE ...) */ + var gcv_object_t* top_of_frame = STACK; diff --git a/clisp.spec b/clisp.spec index fc8b161..234fe17 100644 --- a/clisp.spec +++ b/clisp.spec @@ -1,5 +1,5 @@ # Mercurial snapshot -%global hgver 20161113hg +%global hgver 20170224hg Name: clisp Summary: ANSI Common Lisp implementation @@ -10,9 +10,9 @@ License: GPLv2 URL: http://www.clisp.org/ # The source for this package was pulled from upstream's mercurial repository. # Use the following commands to generate the tarball: -# hg clone -u 536a48a91754 http://hg.code.sf.net/p/clisp/clisp clisp-2.49 +# hg clone -u cf1453aed337 http://hg.code.sf.net/p/clisp/clisp clisp-2.49 # rm -fr clisp-2.49/.hg* -# tar cvJf clisp-2.49-20161113hg.tar.xz clisp-2.49 +# tar cvJf clisp-2.49-20170224hg.tar.xz clisp-2.49 Source0: %{name}-%{version}-%{hgver}.tar.xz #Source0: http://downloads.sourceforge.net/clisp/%%{name}-%%{version}.tar.bz2 # http://sourceforge.net/tracker/?func=detail&aid=3529607&group_id=1355&atid=301355 @@ -25,8 +25,12 @@ Patch2: %{name}-libsvm.patch Patch3: %{name}-db.patch # Linux-specific fixes. Sent upstream 25 Jul 2012. Patch4: %{name}-linux.patch -# Fix for 32-bit compilation. Sent upstream 28 Jan 2017. -Patch5: %{name}-32bit.patch +# Add missing volatile keywords. +Patch5: %{name}-volatile.patch +# Left shift of a signed value invokes undefined behabvior. +Patch6: %{name}-negshift.patch +# Fix an aliasing issue, causes a build failure on ARM. +Patch7: %{name}-alias.patch BuildRequires: compat-readline5-devel BuildRequires: dbus-devel @@ -100,6 +104,8 @@ Files necessary for linking CLISP programs. %patch3 %patch4 %patch5 +%patch6 +%patch7 # Convince CLisp to build against compat-readline5 instead of readline. # This is to avoid pulling the GPLv3 readline 6 into a GPLv2 CLisp binary. @@ -416,6 +422,11 @@ ln -s ../../src/modules.c build/full/modules.c %changelog +* Fri Feb 24 2017 Jerry James - 2.49-22.20170224hg +- Update to latest mercurial snapshot +- Drop upstreamed -32bit patch +- Add -volatile, -negshift, and -alias patches + * Fri Feb 10 2017 Fedora Release Engineering - 2.49-22.20161113hg - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 27981fa..5166d1a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (clisp-2.49-20161113hg.tar.xz) = 6231289ba0b40292a84ec3d238dda04dfaff5c171aa14ef9f1e2cefc72e02a0cf77f9de98d09b1eb5151d6e1ee4535cb050ff2e6bbcade0492ad211ed2756305 +SHA512 (clisp-2.49-20170224hg.tar.xz) = e5ebccc48254ce82e707d9bf1e4f8f6711502bb541aa9958e25e1ced5a2aae286071adefbe2969018402e29056d49887a3dc36df7542cffffa05f1bc84b59d07