summaryrefslogtreecommitdiff
blob: b44dea4d09a8ab21d010795f8d285716178261e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff -r -U3 maxima-5.42.0.orig/src/maxima.in maxima-5.42.0/src/maxima.in
--- maxima-5.42.0.orig/src/maxima.in	2018-09-21 08:21:11.000000000 +0700
+++ maxima-5.42.0/src/maxima.in	2018-10-01 21:49:23.551633882 +0700
@@ -236,7 +236,7 @@
    fi
 
 elif [ "$MAXIMA_LISP" = "ecl" ]; then
-   exec "$maxima_image_base" --frame-stack 4096 --lisp-stack 65536 $MAXIMA_LISP_OPTIONS -- "$@"
+   exec "$maxima_image_base" --frame-stack 4096 --lisp-stack 65536 $MAXIMA_LISP_OPTIONS -norc -- "$@"
 
 elif [ "$MAXIMA_LISP" = "sbcl" ]; then
 # Use executable image if it exists.
diff -r -U3 maxima-5.42.0.orig/src/maxima.system maxima-5.42.0/src/maxima.system
--- maxima-5.42.0.orig/src/maxima.system	2016-12-04 05:27:40.000000000 +0700
+++ maxima-5.42.0/src/maxima.system	2018-10-01 22:01:08.068604254 +0700
@@ -59,6 +59,14 @@
 	 (c:build-fasl output :lisp-files (list object-output)))))
 
 #+ecl
+(defun split-ld-flags-for-ecl (string &aux space)
+  (setf string (string-trim '(#\Space) string))
+  (if (setf space (position #\Space string))
+    (cons (subseq string 0 space)
+      (split-ld-flags-for-ecl (subseq string (1+ space))))
+    (cons string nil)))
+
+#+ecl
 (defun build-maxima-lib ()
   (labels ((list-all-objects (module)
              (if (eql (mk::component-type module) :file)
@@ -75,11 +83,16 @@
 			     ;; Convert dir/foo.fas to dir/foo.o
 			     (make-pathname :type "o" :defaults p))
 			 files)))
+       (c::build-fasl "binary-ecl/maxima" :lisp-files obj
+                      :ld-flags
+                       (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+                                                           (find-package "MAXIMA")))))
+                         (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x))))
 	(c::build-program "binary-ecl/maxima" :lisp-files obj
 			  :ld-flags
 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
 							      (find-package "MAXIMA")))))
-			    (if (and x (not (string= x ""))) (list x)))
+			    (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x)))
 			  :epilogue-code '(progn (require :defsystem)
 					         (cl-user::run)))))))