-
Notifications
You must be signed in to change notification settings - Fork 1
/
sbcl-customizations.patch
67 lines (65 loc) · 2.79 KB
/
sbcl-customizations.patch
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
diff -Naur sbcl.old/binary-distribution.sh sbcl.new/binary-distribution.sh
--- sbcl.old/binary-distribution.sh 2023-01-28 06:56:32.000000000 -0500
+++ sbcl.new/binary-distribution.sh 2023-02-17 18:54:56.621802512 -0500
@@ -15,8 +15,8 @@
# if by definition everything is already built?
tar -cf $b-binary.tar \
- $b/output/sbcl.core $b/src/runtime/sbcl $b/output/prefix.def \
- $b/src/runtime/sbcl.mk \
+ $b/output/sbcl.core $b/src/runtime/sbcl $b/output/prefix.def \
+ $b/src/runtime/sbcl.mk $b/src/runtime/binaries.mk $b/third_party/include \
`grep '^LIBSBCL=' $b/src/runtime/sbcl.mk | cut -d= -f2- | while read lib; do echo $b/src/runtime/$lib; done` \
$b/BUGS $b/COPYING $b/CREDITS $b/INSTALL $b/NEWS $b/README \
$b/install.sh $b/find-gnumake.sh $b/sbcl-pwd.sh $b/run-sbcl.sh \
diff -Naur sbcl.old/make-target-2-load.lisp sbcl.new/make-target-2-load.lisp
--- sbcl.old/make-target-2-load.lisp 2023-01-28 06:56:32.000000000 -0500
+++ sbcl.new/make-target-2-load.lisp 2023-02-17 18:53:20.689559120 -0500
@@ -63,7 +63,9 @@
(cons
sb-impl::!sbcl-architecture
(read-from-string "
- (:COMMON-LISP :SBCL :ANSI-CL :IEEE-FLOATING-POINT
+ (;; GOODIES
+ :CL+SSL-FOREIGN-LIBS-ALREADY-LOADED
+ :COMMON-LISP :SBCL :ANSI-CL :IEEE-FLOATING-POINT
:64-BIT ; choice of word size. 32-bit if absent
:BIG-ENDIAN :LITTLE-ENDIAN ; endianness: pick one and only one
:BSD :UNIX :LINUX :WIN32 :DARWIN :SUNOS :ANDROID ; OS: pick one or more
diff -Naur sbcl.old/src/cold/base-target-features.lisp-expr sbcl.new/src/cold/base-target-features.lisp-expr
--- sbcl.old/src/cold/base-target-features.lisp-expr 2023-01-28 06:56:32.000000000 -0500
+++ sbcl.new/src/cold/base-target-features.lisp-expr 2023-02-17 18:53:20.689559120 -0500
@@ -42,6 +42,9 @@
;; features present in all builds
;;
+ ;; GOODIES
+ :cl+ssl-foreign-libs-already-loaded
+
;; our standard
:ansi-cl :common-lisp
;; FIXME: Isn't there a :x3jsomething feature which we should set too?
diff -Naur sbcl.old/src/runtime/binaries.mk sbcl.new/src/runtime/binaries.mk
--- sbcl.old/src/runtime/binaries.mk 1969-12-31 19:00:00.000000000 -0500
+++ sbcl.new/src/runtime/binaries.mk 2023-02-17 18:53:20.689559120 -0500
@@ -0,0 +1,22 @@
+include sbcl.mk
+
+all: targets
+BINARIES=sbcl sbcl.extras
+targets: $(BINARIES)
+
+LIBFIXPOSIX=${CUSTOM_LIBDIR}/libfixposix.a
+LIBCRYPTO=${SYS_LIBDIR}/libcrypto.a
+LIBSSL=${SYS_LIBDIR}/libssl.a
+STATIC_ARCHIVES=$(LIBFIXPOSIX) $(LIBCRYPTO) $(LIBSSL)
+SLIBS=-Wl,--whole-archive $(STATIC_ARCHIVES) -Wl,--no-whole-archive
+
+sbcl: $(LIBSBCL)
+ $(CC) -fno-pie -no-pie $(LINKFLAGS) -o $@ $(LIBSBCL) $(LIBS)
+
+sbcl.extras: $(LIBSBCL)
+ $(CC) -fno-pie -no-pie $(LINKFLAGS) -o $@ $(LIBSBCL) $(SLIBS) $(LIBS)
+
+clean:
+ $(RM) $(BINARIES)
+
+.PHONY: all targets