-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
From c3236b6df9af74ec4c0c5aa9d5b1d95b43392a4a Mon Sep 17 00:00:00 2001 | ||
From 3689f3e8291a4ad289ad8580a9afb227cbb8e7eb Mon Sep 17 00:00:00 2001 | ||
From: Kartik Singh <[email protected]> | ||
Date: Thu, 12 Dec 2024 11:40:25 -0800 | ||
Subject: [PATCH] Patch libsbcl build for Windows | ||
|
||
--- | ||
make-shared-library.sh | 2 +- | ||
src/runtime/GNUmakefile | 4 ++-- | ||
2 files changed, 3 insertions(+), 3 deletions(-) | ||
src/runtime/GNUmakefile | 8 ++++++-- | ||
2 files changed, 7 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/make-shared-library.sh b/make-shared-library.sh | ||
index 9acd9d843..39a951e9e 100755 | ||
|
@@ -19,16 +19,20 @@ index 9acd9d843..39a951e9e 100755 | |
-$GNUMAKE -C src/runtime libsbcl.so | ||
+$GNUMAKE -C src/runtime libsbcl.dll | ||
diff --git a/src/runtime/GNUmakefile b/src/runtime/GNUmakefile | ||
index 15e12a995..59d61592e 100644 | ||
index 15e12a995..e02db7906 100644 | ||
--- a/src/runtime/GNUmakefile | ||
+++ b/src/runtime/GNUmakefile | ||
@@ -132,8 +132,8 @@ libsbcl.a: $(OBJS) | ||
@@ -132,8 +132,12 @@ libsbcl.a: $(OBJS) | ||
rm -f $@ ; ar rcs $@ $^ | ||
|
||
PIC_OBJS = $(subst .o,.pic.o,$(OBJS)) | ||
-libsbcl.so: $(PIC_OBJS) | ||
- $(CC) -shared -o $@ $^ $(LIBS) $(SOFLAGS) | ||
+libsbcl.dll: $(PIC_OBJS) | ||
+# The MINGW64 environment uses msvcrt.dll as the C runtime, which does | ||
+# not export log1p and log2. We statically link MPFR, which provides | ||
+# those two functions, into the DLL and then export the missing | ||
+# functions via mswin64.def. | ||
+ $(CC) -shared -o $@ $^ $(LIBS) $(SOFLAGS) -Wl,-export-all-symbols -Wl,--whole-archive -lmpfr -Wl,--no-whole-archive mswin64.def | ||
# for this to work, you must have with-gcc-tls in your build features already. | ||
# can't define it here because then it conflicts if you have it in both places. | ||
|