diff --git a/.gitignore b/.gitignore index 1d223fd..ad12c5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /ecl-doc.tar.xz /ecl-16.0.0.tgz /ecl-16.1.2.tgz +/ecl-16.1.3.tgz diff --git a/ecl-16.1.2-end_of_line.patch b/ecl-16.1.2-end_of_line.patch deleted file mode 100644 index 2d80efe..0000000 --- a/ecl-16.1.2-end_of_line.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/aclocal.m4.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/aclocal.m4 2016-03-04 17:25:27.927423367 -0700 -@@ -762,7 +762,7 @@ int main() { - fclose(f); - f = fopen("conftestval","w"); - if (f == NULL) exit(1); -- fprintf(f, output); -+ fputs(output, f); - fclose(f); - exit(0); - } ---- src/configure.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/configure 2016-03-04 17:25:27.930423123 -0700 -@@ -7853,7 +7853,7 @@ int main() { - fclose(f); - f = fopen("conftestval","w"); - if (f == NULL) exit(1); -- fprintf(f, output); -+ fputs(output, f); - fclose(f); - exit(0); - } diff --git a/ecl-16.1.2-fenv-access.patch b/ecl-16.1.2-fenv-access.patch deleted file mode 100644 index 1c9f0a7..0000000 --- a/ecl-16.1.2-fenv-access.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- src/c/Makefile.in.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/Makefile.in 2016-03-04 17:23:49.062402836 -0700 -@@ -84,6 +84,29 @@ all: $(DPP) ../libeclmin.a ../cinit.o - .d.o: $(DPP) - if test -f ../CROSS-DPP ; then ../CROSS-DPP $< $@.c ; else $(DPP) $< $@.c ; fi - $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -o $@ $@.c -+# GCC doesn't understand #pragma STDC FENV_ACCESS ON, so we do this instead: -+numbers/atan.o: numbers/atan.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/cos.o: numbers/cos.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/cosh.o: numbers/cosh.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/exp.o: numbers/exp.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/expt.o: numbers/expt.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/log.o: numbers/log.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/sin.o: numbers/sin.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/sinh.o: numbers/sinh.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/sqrt.o: numbers/sqrt.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/tan.o: numbers/tan.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< -+numbers/tanh.o: numbers/tanh.c -+ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< - .c.o: - $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -o $@ $< - .d.s: $(HFILES) diff --git a/ecl-16.1.2-signal_handling_thread.patch b/ecl-16.1.2-signal_handling_thread.patch deleted file mode 100644 index eeaa42d..0000000 --- a/ecl-16.1.2-signal_handling_thread.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- src/c/main.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/main.d 2016-03-04 17:21:52.065803914 -0700 -@@ -90,7 +90,11 @@ cl_fixnum ecl_option_values[ECL_OPT_LIMI - 1, /* ECL_OPT_TRAP_SIGPIPE */ - 1, /* ECL_OPT_TRAP_SIGCHLD */ - 1, /* ECL_OPT_TRAP_INTERRUPT_SIGNAL */ -+#ifdef GBC_BOEHM_GENGC -+ 0, /* ECL_OPT_SIGNAL_HANDLING_THREAD */ -+#else - 1, /* ECL_OPT_SIGNAL_HANDLING_THREAD */ -+#endif - 16, /* ECL_OPT_SIGNAL_QUEUE_SIZE */ - 0, /* ECL_OPT_BOOTED */ - 8192, /* ECL_OPT_BIND_STACK_SIZE */ -@@ -506,11 +510,11 @@ cl_boot(int argc, char **argv) - return 1; - } - -- /*ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0);*/ -- - #if !defined(GBC_BOEHM) - setbuf(stdin, stdin_buf); - setbuf(stdout, stdout_buf); -+#else -+ ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0); - #endif - - ARGC = argc; diff --git a/ecl-16.1.2-warnings.patch b/ecl-16.1.2-warnings.patch deleted file mode 100644 index 526dee6..0000000 --- a/ecl-16.1.2-warnings.patch +++ /dev/null @@ -1,223 +0,0 @@ ---- src/c/alloc_2.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/alloc_2.d 2016-03-04 16:54:07.210289947 -0700 -@@ -764,8 +764,10 @@ to_bitmap(void *x, void *y) - void - init_alloc(void) - { -+#ifdef GBC_BOEHM_PRECISE - union cl_lispunion o; - struct ecl_cons c; -+#endif - int i; - if (alloc_initialized) return; - alloc_initialized = TRUE; ---- src/c/cinit.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/cinit.d 2016-03-04 16:54:07.213289706 -0700 -@@ -175,6 +175,7 @@ static cl_object si_simple_toplevel () - ecl_prin1(sentence, output); - } - } ECL_CATCH_ALL_END; -+ return ECL_NIL; - } - - int ---- src/c/compiler.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/compiler.d 2016-03-04 16:54:07.214289626 -0700 -@@ -3108,7 +3108,7 @@ si_valid_function_name_p(cl_object name) - cl_object - si_make_lambda(cl_object name, cl_object rest) - { -- cl_object lambda; -+ cl_object lambda = ECL_NIL; - const cl_env_ptr the_env = ecl_process_env(); - volatile cl_compiler_env_ptr old_c_env = the_env->c_env; - struct cl_compiler_env new_c_env; ---- src/c/ffi.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/ffi.d 2016-03-04 16:54:07.214289626 -0700 -@@ -702,7 +702,7 @@ si_load_foreign_module(cl_object filenam - #if !defined(ENABLE_DLOPEN) - FEerror("SI:LOAD-FOREIGN-MODULE does not work when ECL is statically linked", 0); - #else -- cl_object output; -+ cl_object output = ECL_NIL; - - # ifdef ECL_THREADS - mp_get_lock(1, ecl_symbol_value(@'mp::+load-compile-lock+')); ---- src/c/ffi/libraries.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/ffi/libraries.d 2016-03-04 16:54:07.214289626 -0700 -@@ -289,7 +289,6 @@ cl_object - ecl_library_open(cl_object filename, bool force_reload) { - cl_object block; - bool self_destruct = 0; -- char *filename_string; - - /* Coerces to a file name but does not merge with cwd */ - filename = coerce_to_physical_pathname(filename); ---- src/c/file.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/file.d 2016-03-04 16:54:07.215289546 -0700 -@@ -1105,7 +1105,7 @@ static int - utf_8_encoder(cl_object stream, unsigned char *buffer, ecl_character c) - { - int nbytes; -- if (c < 0) { -+ if (c < 0 || c > 0x1FFFFFL) { - nbytes = 0; - } else if (c <= 0x7F) { - buffer[0] = c; -@@ -1120,7 +1120,7 @@ utf_8_encoder(cl_object stream, unsigned - buffer[1] = (c & 0x3f) | 0x80; c >>= 6; - buffer[0] = c | 0xE0; - nbytes = 3; -- } else if (c <= 0x1FFFFFL) { -+ } else { - buffer[3] = (c & 0x3f) | 0x80; c >>= 6; - buffer[2] = (c & 0x3f) | 0x80; c >>= 6; - buffer[1] = (c & 0x3f) | 0x80; c >>= 6; -@@ -5128,7 +5128,7 @@ ecl_open_stream(cl_object fn, enum ecl_s - FEerror("Illegal stream mode ~S", 1, ecl_make_fixnum(smm)); - } - if (flags & ECL_STREAM_C_STREAM) { -- FILE *fp; -+ FILE *fp = NULL; - safe_close(f); - /* We do not use fdopen() because Windows seems to - * have problems with the resulting streams. Furthermore, even for ---- src/cmp/cmpcatch.lsp.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/cmp/cmpcatch.lsp 2016-03-04 16:54:07.215289546 -0700 -@@ -76,6 +76,7 @@ - (let ((*unwind-exit* (cons 'FRAME *unwind-exit*)) - (*destination* 'VALUES)) - (c2expr* form)) -+ (wt-nl " next_fr = NULL;") - (wt-nl "}") - (wt-nl "ecl_frs_pop(cl_env_copy);") - ;; Here we save the values of the form which might have been ---- src/cmp/cmptop.lsp.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/cmp/cmptop.lsp 2016-03-04 16:54:07.216289466 -0700 -@@ -438,7 +438,7 @@ - (wt-nl "volatile cl_object lex" *level* "[" *max-lex* "];")) - (when (plusp *max-env*) - (unless (eq closure-type 'CLOSURE) -- (wt-nl "cl_object " *volatile* "env0;")) -+ (wt-nl "cl_object " *volatile* "env0 = ECL_NIL;")) - ;; Note that the closure structure has to be marked volatile - ;; or else GCC may optimize away writes into it because it - ;; does not know it shared with the rest of the world. ---- src/cmp/cmpwt.lsp.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/cmp/cmpwt.lsp 2016-03-04 16:54:07.216289466 -0700 -@@ -105,10 +105,10 @@ - (*wt-data-column* 80) - (s (with-output-to-string (stream) - (wt-filtered-data string stream)))) -- (format stream "static const struct ecl_base_string ~A[] = { -+ (format stream "static const struct ecl_base_string ~A[] = { { - (int8_t)t_base_string, 0, ecl_aet_bc, 0, - ECL_NIL, (cl_index)~D, (cl_index)~D, -- (ecl_base_char*)~A };~%" -+ (ecl_base_char*)~A } };~%" - name *wt-string-size* *wt-string-size* s) - name)) - (output-c-strings (strings stream) ---- src/c/numbers/ceiling.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/numbers/ceiling.d 2016-03-04 16:54:07.216289466 -0700 -@@ -143,7 +143,7 @@ ecl_ceiling2(cl_object x, cl_object y) - } - #endif - default: -- (void)0; /*Never reached */ -+ __builtin_unreachable(); /*Never reached */ - } - break; - case t_bignum: -@@ -189,7 +189,7 @@ ecl_ceiling2(cl_object x, cl_object y) - } - #endif - default: -- (void)0; /*Never reached */ -+ __builtin_unreachable(); /*Never reached */ - } - break; - case t_ratio: ---- src/c/num_log.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/num_log.d 2016-03-04 16:54:07.217289386 -0700 -@@ -478,7 +478,7 @@ cl_object - si_bit_array_op(cl_object o, cl_object x, cl_object y, cl_object r) - { - cl_fixnum i, j, n, d; -- cl_object r0; -+ cl_object r0 = ECL_NIL; - bit_operator op; - bool replace = FALSE; - int xi, yi, ri; ---- src/c/printer/float_to_digits.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/printer/float_to_digits.d 2016-03-04 16:54:07.217289386 -0700 -@@ -179,7 +179,6 @@ change_precision(float_approx *approx, c - { - cl_object e1 = cl_expt(PRINT_BASE, position); - cl_object e2 = ecl_divide(e1, ecl_make_fixnum(2)); -- cl_object e3 = cl_expt(PRINT_BASE, k); - if (ecl_greatereq(ecl_plus(approx->r, ecl_times(approx->s, e1)), - ecl_times(approx->s, e2))) - position = ecl_one_minus(position); ---- src/c/serialize.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/serialize.d 2016-03-04 16:54:07.217289386 -0700 -@@ -119,7 +119,7 @@ fix_to_ptr(cl_object ptr) - static cl_object - enqueue(pool_t pool, cl_object what) - { -- cl_object record, index; -+ cl_object index; - if (ECL_FIXNUMP(what) || ECL_CHARACTERP(what) || what == OBJNULL) { - return what; - } ---- src/c/unixfsys.d.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/c/unixfsys.d 2016-03-04 16:54:07.217289386 -0700 -@@ -476,7 +476,9 @@ ecl_file_len(int f) - - @(defun rename-file (oldn newn &key (if_exists @':error')) - cl_object old_filename, new_filename, old_truename, new_truename; -+#ifdef ECL_MS_WINDOWS_HOST - int error; -+#endif - @ - - /* 1) Get the old filename, and complain if it has wild components, -@@ -680,7 +682,10 @@ ecl_homedir_pathname(cl_object user) - { - cl_index i; - cl_object namestring; -- const char *h, *d; -+ const char *h; -+#ifdef ECL_MS_WINDOWS_HOST -+ const char *d; -+#endif - if (!Null(user)) { - #ifdef HAVE_PWD_H - struct passwd *pwent = NULL; ---- src/h/ecl-inl.h.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/h/ecl-inl.h 2016-03-04 16:54:07.218289306 -0700 -@@ -119,10 +119,10 @@ - static const cl_object name = (cl_object)(& name ## _data) - - #define ecl_def_ct_vector(name,type,raw,len,static,const) \ -- static const struct ecl_vector name ## _data = { \ -+ static const struct ecl_vector name ## _data = { \ - (int8_t)t_vector, 0, (type), 0, \ -- ECL_NIL, (cl_index)(len), (cl_index)(len), \ -- ecl_cast_ptr(cl_object*,raw), 0 }; \ -+ ECL_NIL, (cl_index)(len), (cl_index)(len), \ -+ { ecl_cast_ptr(cl_object*,raw) }, 0 }; \ - static const cl_object name = (cl_object)(& name ## _data) - - #ifdef ECL_SSE2 ---- src/h/stacks.h.orig 2016-02-25 00:06:19.000000000 -0700 -+++ src/h/stacks.h 2016-03-04 16:54:07.218289306 -0700 -@@ -390,7 +390,7 @@ extern ECL_API ecl_frame_ptr _ecl_frs_pu - } else { - - #define ECL_UNWIND_PROTECT_EXIT \ -- __unwinding=0; } \ -+ __unwinding=0; __next_fr=NULL; } \ - ecl_frs_pop(__the_env); \ - __nr = ecl_stack_push_values(__the_env); - diff --git a/ecl-16.1.3-atan.patch b/ecl-16.1.3-atan.patch new file mode 100644 index 0000000..77e6a9b --- /dev/null +++ b/ecl-16.1.3-atan.patch @@ -0,0 +1,126 @@ +--- src/c/numbers/atan.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/numbers/atan.d 2017-02-23 11:03:32.602020581 -0700 +@@ -22,27 +22,29 @@ + static double + ecl_atan2_double(double y, double x) + { +- if (signbit(x)) { +- if (signbit(y)) { +- return -ECL_PI_D + atan(-y / -x); +- } else if (y == 0) { +- return ECL_PI_D; +- } else { +- return ECL_PI_D - atan(y / -x); +- } +- } else if (x == 0) { +- if (signbit(y)) { ++ if (x == 0) { ++ if (y == 0) { ++ /* Signals floating-point-invalid operation. If not trapped, ++ produces NaN. */ ++ return x / y; ++ } else if (signbit(y)) { + return -ECL_PI2_D; +- } else if (y == 0) { +- return x / y; /* Produces a NaN */ + } else { + return ECL_PI2_D; + } ++ } else if (signbit(x)) { ++ if (y == 0) { ++ return ECL_PI_D; ++ } else if (signbit(y)) { ++ return -ECL_PI_D + atan(-y / -x); ++ } else { ++ return ECL_PI_D - atan(y / -x); ++ } + } else { +- if (signbit(y)) { +- return -atan(-y / x); +- } else if (y == 0) { ++ if (y == 0) { + return (double)0; ++ } else if (signbit(y)) { ++ return -atan(-y / x); + } else { + return atan(y / x); + } +@@ -53,27 +55,29 @@ ecl_atan2_double(double y, double x) + static long double + ecl_atan2_long_double(long double y, long double x) + { +- if (signbit(x)) { +- if (signbit(y)) { +- return -ECL_PI_L + atanl(-y / -x); +- } else if (y == 0) { +- return ECL_PI_L; +- } else { +- return ECL_PI_L - atanl(y / -x); +- } +- } else if (x == 0) { +- if (signbit(y)) { ++ if (x == 0) { ++ if (y == 0) { ++ /* Signals floating-point-invalid-operation. If not trapped, ++ produces NaN. */ ++ return x / y; ++ } else if (signbit(y)) { + return -ECL_PI2_L; +- } else if (y == 0) { +- return x / y; /* Produces a NaN */ + } else { + return ECL_PI2_L; + } ++ } else if (signbit(x)) { ++ if (y == 0) { ++ return ECL_PI_L; ++ } else if (signbit(y)) { ++ return -ECL_PI_L + atanl(-y / -x); ++ } else { ++ return ECL_PI_L - atanl(y / -x); ++ } + } else { +- if (signbit(y)) { +- return -atanl(-y / x); +- } else if (y == 0) { ++ if (y == 0) { + return (long double)0; ++ } else if (signbit(y)) { ++ return -atanl(-y / x); + } else { + return atanl(y / x); + } +--- src/tests/normal-tests/mixed.lsp.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/tests/normal-tests/mixed.lsp 2017-02-23 10:56:00.028415503 -0700 +@@ -178,7 +178,7 @@ + ;;;; Created: 2016-09-07 + ;;;; Contains: External process interaction API + ;;;; +-(test external-process.0001.run-program ++(test mix.0011.run-program + (let ((p (nth-value 2 (ext:run-program #-windows "sleep" + #+windows "timeout" + (list "3") :wait nil)))) +@@ -195,3 +195,22 @@ + (finishes (ext:terminate-process p)))) + + ++;;; Date: 2016-12-20 ++;;; Reported by: Kris Katterjohn ++;;; Fixed: Daniel KochmaƄski ++;;; Description: ++;;; ++;;; atan signalled `division-by-zero' exception when the second ++;;; argument was signed zero. Also inconsistent behavior on invalid ++;;; operation (atan 0.0 0.0). ++;;; ++;;; Bug: https://gitlab.com/embeddable-common-lisp/ecl/issues/329 ++(test mix.0012.atan-signed-zero ++ (finishes (atan 1.0 -0.0)) ++ (signals floating-point-invalid-operation (atan -0.0 -0.0)) ++ (signals floating-point-invalid-operation (atan +0.0 -0.0)) ++ (signals floating-point-invalid-operation (atan -0.0 +0.0)) ++ (signals floating-point-invalid-operation (atan +0.0 +0.0))) ++ ++ ++ diff --git a/ecl-16.1.3-end_of_line.patch b/ecl-16.1.3-end_of_line.patch new file mode 100644 index 0000000..999fcc3 --- /dev/null +++ b/ecl-16.1.3-end_of_line.patch @@ -0,0 +1,22 @@ +--- src/aclocal.m4.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/aclocal.m4 2017-02-23 10:38:51.994727931 -0700 +@@ -782,7 +782,7 @@ int main() { + fclose(f); + f = fopen("conftestval","w"); + if (f == NULL) exit(1); +- fprintf(f, output); ++ fputs(output, f); + fclose(f); + exit(0); + } +--- src/configure.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/configure 2017-02-23 10:38:51.997727915 -0700 +@@ -7896,7 +7896,7 @@ int main() { + fclose(f); + f = fopen("conftestval","w"); + if (f == NULL) exit(1); +- fprintf(f, output); ++ fputs(output, f); + fclose(f); + exit(0); + } diff --git a/ecl-16.1.3-fenv-access.patch b/ecl-16.1.3-fenv-access.patch new file mode 100644 index 0000000..22b6e05 --- /dev/null +++ b/ecl-16.1.3-fenv-access.patch @@ -0,0 +1,33 @@ +--- src/Makefile.in.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/Makefile.in 2017-02-23 10:37:33.138140753 -0700 +@@ -183,6 +183,30 @@ c/%.o: $(srcdir)/c/%.c + # if test -f CROSS-DPP ; then ./CROSS-DPP $< $@.c ; else ./$(DPP) $< $@.c ; fi + # $(TRUE_CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -S -o $@ $@.c + ++# GCC doesn't understand #pragma STDC FENV_ACCESS ON, so we do this instead: ++c/numbers/atan.o: c/numbers/atan.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/cos.o: c/numbers/cos.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/cosh.o: c/numbers/cosh.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/exp.o: c/numbers/exp.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/expt.o: c/numbers/expt.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/log.o: c/numbers/log.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/sin.o: c/numbers/sin.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/sinh.o: c/numbers/sinh.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/sqrt.o: c/numbers/sqrt.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/tan.o: c/numbers/tan.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++c/numbers/tanh.o: c/numbers/tanh.c ++ $(CC) -DECLDIR="\"@ecldir@\"" $(CFLAGS) -frounding-math -fsignaling-nans -o $@ $< ++ + # prerequisite libraries + libeclgc.a: libeclatomic.a + test -d ecl/gc || mkdir ecl/gc diff --git a/ecl-16.1.3-signal_handling_thread.patch b/ecl-16.1.3-signal_handling_thread.patch new file mode 100644 index 0000000..cf04c4b --- /dev/null +++ b/ecl-16.1.3-signal_handling_thread.patch @@ -0,0 +1,28 @@ +--- src/c/main.d.orig 2017-02-23 10:23:32.939568519 -0700 ++++ src/c/main.d 2017-02-23 10:25:31.421934110 -0700 +@@ -85,7 +85,11 @@ cl_fixnum ecl_option_values[ECL_OPT_LIMI + 1, /* ECL_OPT_TRAP_SIGPIPE */ + 1, /* ECL_OPT_TRAP_SIGCHLD */ + 1, /* ECL_OPT_TRAP_INTERRUPT_SIGNAL */ ++#ifdef GBC_BOEHM_GENGC ++ 0, /* ECL_OPT_SIGNAL_HANDLING_THREAD */ ++#else + 1, /* ECL_OPT_SIGNAL_HANDLING_THREAD */ ++#endif + 16, /* ECL_OPT_SIGNAL_QUEUE_SIZE */ + 0, /* ECL_OPT_BOOTED */ + 8192, /* ECL_OPT_BIND_STACK_SIZE */ +@@ -497,11 +501,11 @@ cl_boot(int argc, char **argv) + return 1; + } + +- /*ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0);*/ +- + #if !defined(GBC_BOEHM) + setbuf(stdin, stdin_buf); + setbuf(stdout, stdout_buf); ++#else ++ ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0); + #endif + + ARGC = argc; diff --git a/ecl-16.1.3-sse-printer.patch b/ecl-16.1.3-sse-printer.patch new file mode 100644 index 0000000..a424f88 --- /dev/null +++ b/ecl-16.1.3-sse-printer.patch @@ -0,0 +1,11 @@ +--- src/c/printer/write_sse.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/printer/write_sse.d 2017-02-23 10:40:22.505256155 -0700 +@@ -12,6 +12,8 @@ + * + */ + ++#include ++ + #ifdef ECL_SSE2 + #include + #include diff --git a/ecl-16.1.3-warnings.patch b/ecl-16.1.3-warnings.patch new file mode 100644 index 0000000..700815f --- /dev/null +++ b/ecl-16.1.3-warnings.patch @@ -0,0 +1,247 @@ +--- src/c/alloc_2.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/alloc_2.d 2017-02-23 11:33:47.926290573 -0700 +@@ -760,8 +760,10 @@ to_bitmap(void *x, void *y) + void + init_alloc(void) + { ++#ifdef GBC_BOEHM_PRECISE + union cl_lispunion o; + struct ecl_cons c; ++#endif + int i; + if (alloc_initialized) return; + alloc_initialized = TRUE; +--- src/c/cinit.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/cinit.d 2017-02-23 11:33:47.927290568 -0700 +@@ -171,6 +171,7 @@ static cl_object si_simple_toplevel () + ecl_prin1(sentence, output); + } + } ECL_CATCH_ALL_END; ++ return ECL_NIL; + } + + int +--- src/c/compiler.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/compiler.d 2017-02-23 11:33:47.927290568 -0700 +@@ -3102,7 +3102,7 @@ si_valid_function_name_p(cl_object name) + cl_object + si_make_lambda(cl_object name, cl_object rest) + { +- cl_object lambda; ++ cl_object lambda = ECL_NIL; + const cl_env_ptr the_env = ecl_process_env(); + volatile cl_compiler_env_ptr old_c_env = the_env->c_env; + struct cl_compiler_env new_c_env; +--- src/c/ffi.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/ffi.d 2017-02-23 11:33:47.927290568 -0700 +@@ -676,7 +676,7 @@ si_load_foreign_module(cl_object filenam + #if !defined(ENABLE_DLOPEN) + FEerror("SI:LOAD-FOREIGN-MODULE does not work when ECL is statically linked", 0); + #else +- cl_object output; ++ cl_object output = ECL_NIL; + + # ifdef ECL_THREADS + mp_get_lock(1, ecl_symbol_value(@'mp::+load-compile-lock+')); +--- src/c/ffi/libraries.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/ffi/libraries.d 2017-02-23 11:33:47.927290568 -0700 +@@ -284,7 +284,6 @@ cl_object + ecl_library_open(cl_object filename, bool force_reload) { + cl_object block; + bool self_destruct = 0; +- char *filename_string; + + /* Coerces to a file name but does not merge with cwd */ + filename = coerce_to_physical_pathname(filename); +--- src/c/file.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/file.d 2017-02-23 11:34:20.968112017 -0700 +@@ -1100,7 +1100,7 @@ static int + utf_8_encoder(cl_object stream, unsigned char *buffer, ecl_character c) + { + int nbytes; +- if (c < 0) { ++ if (c < 0 || c > 0x1FFFFFL) { + nbytes = 0; + } else if (c <= 0x7F) { + buffer[0] = c; +@@ -1115,7 +1115,7 @@ utf_8_encoder(cl_object stream, unsigned + buffer[1] = (c & 0x3f) | 0x80; c >>= 6; + buffer[0] = c | 0xE0; + nbytes = 3; +- } else if (c <= 0x1FFFFFL) { ++ } else { + buffer[3] = (c & 0x3f) | 0x80; c >>= 6; + buffer[2] = (c & 0x3f) | 0x80; c >>= 6; + buffer[1] = (c & 0x3f) | 0x80; c >>= 6; +@@ -1626,7 +1626,7 @@ ecl_make_string_input_stream(cl_object s + strm->stream.flags = ECL_STREAM_DEFAULT_FORMAT; + strm->stream.byte_size = 8; + #else +- if (ECL_BASE_STRING_P(strng) == t_base_string) { ++ if (ECL_BASE_STRING_P(strng)) { + strm->stream.format = @':latin-1'; + strm->stream.flags = ECL_STREAM_LATIN_1; + strm->stream.byte_size = 8; +@@ -5126,7 +5126,7 @@ ecl_open_stream(cl_object fn, enum ecl_s + FEerror("Illegal stream mode ~S", 1, ecl_make_fixnum(smm)); + } + if (flags & ECL_STREAM_C_STREAM) { +- FILE *fp; ++ FILE *fp = NULL; + safe_close(f); + /* We do not use fdopen() because Windows seems to + * have problems with the resulting streams. Furthermore, even for +--- src/cmp/cmpcatch.lsp.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/cmp/cmpcatch.lsp 2017-02-23 10:09:52.183082215 -0700 +@@ -76,6 +76,7 @@ + (let ((*unwind-exit* (cons 'FRAME *unwind-exit*)) + (*destination* 'VALUES)) + (c2expr* form)) ++ (wt-nl " next_fr = NULL;") + (wt-nl "}") + (wt-nl "ecl_frs_pop(cl_env_copy);") + ;; Here we save the values of the form which might have been +--- src/cmp/cmptop.lsp.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/cmp/cmptop.lsp 2017-02-23 11:33:47.928290563 -0700 +@@ -438,7 +438,7 @@ + (wt-nl "volatile cl_object lex" *level* "[" *max-lex* "];")) + + (unless (eq closure-type 'CLOSURE) +- (wt-nl "cl_object " *volatile* "env0;")) ++ (wt-nl "cl_object " *volatile* "env0 = ECL_NIL;")) + + (when (plusp *max-env*) + ;; Closure structure has to be marked volatile or else GCC may +--- src/cmp/cmpwt.lsp.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/cmp/cmpwt.lsp 2017-02-23 10:09:52.197082134 -0700 +@@ -105,10 +105,10 @@ + (*wt-data-column* 80) + (s (with-output-to-string (stream) + (wt-filtered-data string stream)))) +- (format stream "static const struct ecl_base_string ~A[] = { ++ (format stream "static const struct ecl_base_string ~A[] = { { + (int8_t)t_base_string, 0, ecl_aet_bc, 0, + ECL_NIL, (cl_index)~D, (cl_index)~D, +- (ecl_base_char*)~A };~%" ++ (ecl_base_char*)~A } };~%" + name *wt-string-size* *wt-string-size* s) + name)) + (output-c-strings (strings stream) +--- src/c/numbers/ceiling.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/numbers/ceiling.d 2017-02-23 11:33:47.928290563 -0700 +@@ -138,7 +138,7 @@ ecl_ceiling2(cl_object x, cl_object y) + } + #endif + default: +- (void)0; /*Never reached */ ++ __builtin_unreachable(); /*Never reached */ + } + break; + case t_bignum: +@@ -184,7 +184,7 @@ ecl_ceiling2(cl_object x, cl_object y) + } + #endif + default: +- (void)0; /*Never reached */ ++ __builtin_unreachable(); /*Never reached */ + } + break; + case t_ratio: +--- src/c/num_log.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/num_log.d 2017-02-23 11:33:47.929290557 -0700 +@@ -476,7 +476,7 @@ cl_object + si_bit_array_op(cl_object o, cl_object x, cl_object y, cl_object r) + { + cl_fixnum i, j, n, d; +- cl_object r0; ++ cl_object r0 = ECL_NIL; + bit_operator op; + bool replace = FALSE; + int xi, yi, ri; +--- src/c/printer/float_to_digits.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/printer/float_to_digits.d 2017-02-23 11:33:47.929290557 -0700 +@@ -176,7 +176,6 @@ change_precision(float_approx *approx, c + { + cl_object e1 = cl_expt(PRINT_BASE, position); + cl_object e2 = ecl_divide(e1, ecl_make_fixnum(2)); +- cl_object e3 = cl_expt(PRINT_BASE, k); + if (ecl_greatereq(ecl_plus(approx->r, ecl_times(approx->s, e1)), + ecl_times(approx->s, e2))) + position = ecl_one_minus(position); +--- src/c/serialize.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/serialize.d 2017-02-23 11:33:47.929290557 -0700 +@@ -114,7 +114,7 @@ fix_to_ptr(cl_object ptr) + static cl_object + enqueue(pool_t pool, cl_object what) + { +- cl_object record, index; ++ cl_object index; + if (ECL_FIXNUMP(what) || ECL_CHARACTERP(what) || what == OBJNULL) { + return what; + } +--- src/c/unixfsys.d.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/c/unixfsys.d 2017-02-23 11:33:47.929290557 -0700 +@@ -478,7 +478,9 @@ ecl_file_len(int f) + + @(defun rename-file (oldn newn &key (if_exists @':error')) + cl_object old_filename, new_filename, old_truename, new_truename; ++#ifdef ECL_MS_WINDOWS_HOST + int error; ++#endif + @ + + /* 1) Get the old filename, and complain if it has wild components, +@@ -682,7 +684,10 @@ ecl_homedir_pathname(cl_object user) + { + cl_index i; + cl_object namestring; +- const char *h, *d; ++ const char *h; ++#ifdef ECL_MS_WINDOWS_HOST ++ const char *d; ++#endif + if (!Null(user)) { + #ifdef HAVE_PWD_H + struct passwd *pwent = NULL; +--- src/h/ecl-inl.h.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/h/ecl-inl.h 2017-02-23 10:09:52.199082122 -0700 +@@ -119,10 +119,10 @@ + static const cl_object name = (cl_object)(& name ## _data) + + #define ecl_def_ct_vector(name,type,raw,len,static,const) \ +- static const struct ecl_vector name ## _data = { \ ++ static const struct ecl_vector name ## _data = { \ + (int8_t)t_vector, 0, (type), 0, \ +- ECL_NIL, (cl_index)(len), (cl_index)(len), \ +- ecl_cast_ptr(cl_object*,raw), 0 }; \ ++ ECL_NIL, (cl_index)(len), (cl_index)(len), \ ++ { ecl_cast_ptr(cl_object*,raw) }, 0 }; \ + static const cl_object name = (cl_object)(& name ## _data) + + #ifdef ECL_SSE2 +--- src/h/stacks.h.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/h/stacks.h 2017-02-23 10:09:52.199082122 -0700 +@@ -390,7 +390,7 @@ extern ECL_API ecl_frame_ptr _ecl_frs_pu + } else { + + #define ECL_UNWIND_PROTECT_EXIT \ +- __unwinding=0; } \ ++ __unwinding=0; __next_fr=NULL; } \ + ecl_frs_pop(__the_env); \ + __nr = ecl_stack_push_values(__the_env); + +--- src/Makefile.in.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/Makefile.in 2017-02-23 12:18:42.610641001 -0700 +@@ -134,9 +134,9 @@ c/ecl/external.h: $(top_srcdir)/h/extern + # rsync updates of the source tree. + $(srcdir)/c/symbols_list2.h: $(srcdir)/c/symbols_list.h Makefile + cat $(srcdir)/c/symbols_list.h | \ +- sed -e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*NULL,.*}%{\1,NULL}%g' \ +- -e 's%{\([A-Z ]*.*".*"\),[^,]*,[ ]*\([^,]*\),.*}%{\1,"\2"}%g' \ +- -e 's%{NULL.*%{NULL,NULL}};%' | \ ++ sed -e 's%{{\([A-Z ]*.*".*"\),[^,]*,[ ]*NULL,.*}}%{\1,NULL}%g' \ ++ -e 's%{{\([A-Z ]*.*".*"\),[^,]*,[ ]*\([^,]*\),.*}}%{\1,"\2"}%g' \ ++ -e 's%{{NULL.*%{NULL,NULL}};%' | \ + sed -e 's%"\(IF_[A-Z0-9]*\)(\([^)]*\))"%\1("\2")%g' > tmp.h + mv tmp.h $@ + diff --git a/ecl.spec b/ecl.spec index 7cb1048..354399c 100644 --- a/ecl.spec +++ b/ecl.spec @@ -1,11 +1,11 @@ Name: ecl -Version: 16.1.2 -Release: 2%{?dist} +Version: 16.1.3 +Release: 1%{?dist} Summary: Embeddable Common-Lisp License: LGPLv2+ and BSD and MIT and Public Domain URL: https://common-lisp.net/project/ecl/ -Source0: https://common-lisp.net/project/ecl/files/%{name}-%{version}.tgz +Source0: https://common-lisp.net/project/ecl/static/files/release/%{name}-%{version}.tgz # The manual has not yet been released. Use the following commands to generate # the manual tarball: # git clone https://gitlab.com/embeddable-common-lisp/ecl-doc.git @@ -22,18 +22,22 @@ Source3: %{name}.svg # This patch was sent upstream on 4 Feb 2012. It fixes a few warnings # from the C compiler that indicate situations that might be dangerous at # runtime. -Patch0: %{name}-16.1.2-warnings.patch +Patch0: %{name}-16.1.3-warnings.patch # Do not use a separate thread to handle signals by default if built with # boehm-gc support. # This prevents a deadlock when building maxima with ecl support in # fedora, and should handle by default these problems: # http://trac.sagemath.org/sage_trac/ticket/11752 # http://www.mail-archive.com/ecls-list@lists.sourceforge.net/msg00644.html -Patch1: %{name}-16.1.2-signal_handling_thread.patch +Patch1: %{name}-16.1.3-signal_handling_thread.patch # GCC does not implement support for #pragma STDC FENV_ACCESS -Patch2: %{name}-16.1.2-fenv-access.patch +Patch2: %{name}-16.1.3-fenv-access.patch # fix when building with -Werror=format-security, upstreamable -Patch3: %{name}-16.1.2-end_of_line.patch +Patch3: %{name}-16.1.3-end_of_line.patch +# Upstream patch to fix the SSE printer +Patch4: %{name}-16.1.3-sse-printer.patch +# Upstream patch to fix maxima test failure with atan with signed zero +Patch5: %{name}-16.1.3-atan.patch BuildRequires: gcc BuildRequires: libX11-devel @@ -75,20 +79,23 @@ Gray streams. %patch1 %patch2 %patch3 +%patch4 +%patch5 # Remove spurious executable bits find src/c -type f -perm /0111 | xargs chmod a-x find src/h -type f -perm /0111 | xargs chmod a-x +# Temporary fix for missing braces in initializers, causes build failure +sed -i 's/{.*,.*,.*,.*,.*}/{&}/g' src/c/symbols_list.h +sed -i 's/{.*,.*,.*,.*}/{&}/g' src/c/unicode/ucd_names_pair.c + %build %configure --enable-unicode=yes --enable-c99complex --enable-threads=yes \ - --with-__thread --with-clx --disable-rpath \ -%ifarch x86_64 - --with-sse \ -%endif + --with-__thread --with-clx --disable-rpath --with-sse=auto \ CPPFLAGS=$(pkg-config --cflags libffi) \ - CFLAGS="%{optflags} -Wno-unused -Wno-return-type" + CFLAGS="%{optflags} -Wno-unused -Wno-return-type -Wno-unknown-pragmas" make mkdir -p ecl-doc/tmp make -C ecl-doc @@ -151,10 +158,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null ||: %{_mandir}/man1/* %doc examples CHANGELOG ecl-doc/html %doc src/doc/amop.txt src/doc/types-and-classes -%license LGPL LICENSE +%license COPYING LICENSE %changelog +* Fri Feb 24 2017 Jerry James - 16.1.3-1 +- New upstream release + * Fri Feb 10 2017 Fedora Release Engineering - 16.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 5b223c4..0716ceb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -96ea77edb2b79d1e5c3dc37afbd37950 ecl-16.1.2.tgz -ec186934bf2336c32bfd7a5bd9192031 ecl-doc.tar.xz +SHA512 (ecl-16.1.3.tgz) = 5d743f422f6bc24671abf4c739cde8273d08f056906a1ef8aed5145c703b6d52c7fa4b5e0be8c125f32240c20ce053007786bb3ae81cc34d47791f6fae0819c1 +SHA512 (ecl-doc.tar.xz) = 41840ab0d89a56fc2ff12cc73ed7359a6c185e703695db3b06e11e4ee965e178befc053bc7038c7207b04dca1a9be6ab1787131bb853b530dc8114fed0bdf9c8