Skip to content

Commit 48a6e7c

Browse files
committed
Support flexdll 0.43/0.44 vendor-supplied patches
Remove the Win64 ARM64 flexdll cross-compiling patches as flexdll does not yet support ARM64. Only keep it for a hypothetical 0.99 version.
1 parent 321d4ac commit 48a6e7c

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Pending
44

5+
* Support vendor-supplied patches for flexdll 0.43 and unreleased 0.44. Patches are
6+
now relative to ocaml parent directory so all `git am` based patches are of form
7+
`flexdll/flexdll.c`, etc. to make robust to the lack of `flexdll/.git`.
8+
Vendor supplied patches are used by DkSDK CMake's `110-ocaml-lang`.
9+
10+
## 2.1.3
11+
512
* Backport from 5.2.0 of [Linear computation of closure environments](https://github.com/ocaml/ocaml/pull/12222)
613
to fix performance bug <https://discuss.ocaml.org/t/scaling-factors-when-compiling-mutually-recursive-definitions/14708>
714

src/p/flexdll-cross-0_42-a01-arm64.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/p/flexdll-cross-0_39-a01-arm64.patch renamed to src/p/flexdll-cross-0_99-a01-arm64.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/flexdll.c b/flexdll.c
1+
diff --git a/flexdll/flexdll.c b/flexdll/flexdll.c
22
index b19fe2a..bcc922d 100644
3-
--- a/flexdll.c
4-
+++ b/flexdll.c
3+
--- a/flexdll/flexdll.c
4+
+++ b/flexdll/flexdll.c
55
@@ -16,9 +16,9 @@
66

77
/* Guard against compiling with the wrong cl! */

src/r-c-ocaml-1-setup.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ set_ocaml_version_stems() {
466466
4.*) VERSION_STEMS+=("4") ;;
467467
5.*) VERSION_STEMS+=("5") ;;
468468
*)
469-
echo "FATAL: Unsupported stemming case 1 for version $set_version_stems_VER" >&2
469+
echo "FATAL: Unsupported stemming case 1 for ocaml version $set_version_stems_VER" >&2
470470
exit 123
471471
;;
472472
esac
@@ -480,16 +480,17 @@ set_ocaml_version_stems() {
480480
5.1.*) VERSION_STEMS+=("5_1") ;;
481481
5.2.*) VERSION_STEMS+=("5_2") ;;
482482
*)
483-
echo "FATAL: Unsupported stemming case 2 for version $set_version_stems_VER" >&2
483+
echo "FATAL: Unsupported stemming case 2 for ocaml version $set_version_stems_VER" >&2
484484
exit 123
485485
;;
486486
esac
487487
case "$set_version_stems_VER" in
488488
4.14.0) VERSION_STEMS+=("4_14_0") ;;
489489
4.14.1) VERSION_STEMS+=("4_14_1") ;;
490490
4.14.2) VERSION_STEMS+=("4_14_2") ;;
491+
4.14.3) VERSION_STEMS+=("4_14_3") ;;
491492
*)
492-
echo "FATAL: Unsupported stemming case 3 for version $set_version_stems_VER" >&2
493+
echo "FATAL: Unsupported stemming case 3 for ocaml version $set_version_stems_VER" >&2
493494
exit 123
494495
;;
495496
esac
@@ -500,12 +501,20 @@ set_flexdll_version_stems() {
500501
VERSION_STEMS=()
501502
case "$set_version_stems_VER" in
502503
0.*) VERSION_STEMS+=("0") ;;
504+
*)
505+
echo "FATAL: Unsupported stemming case 1 for flexdll version $set_version_stems_VER" >&2
506+
exit 123
507+
;;
503508
esac
504509
case "$set_version_stems_VER" in
505510
0.39) VERSION_STEMS+=("0_39") ;;
506-
esac
507-
case "$set_version_stems_VER" in
508511
0.42) VERSION_STEMS+=("0_42") ;;
512+
0.43) VERSION_STEMS+=("0_43") ;;
513+
0.44) VERSION_STEMS+=("0_44") ;;
514+
*)
515+
echo "FATAL: Unsupported stemming case 2 for flexdll version $set_version_stems_VER" >&2
516+
exit 123
517+
;;
509518
esac
510519
}
511520
# Sets the array PATCHES and accumulates dkmldir/ relative paths, including
@@ -799,9 +808,9 @@ BUILD_HOST_ARGS+=( -s "$_OCAMLVER" )
799808
BUILD_CROSS_ARGS+=( -s "$_OCAMLVER" )
800809

801810
# Find and apply patches to the host ABI
802-
apply_patches "$OCAMLSRC_UNIX" ocaml "$_OCAMLVER" host
811+
apply_patches "$OCAMLSRC_UNIX" ocaml "$_OCAMLVER" host
803812
if [ -e "$OCAMLSRC_UNIX"/flexdll/Makefile ] && is_unixy_windows_build_machine; then
804-
apply_patches "$OCAMLSRC_UNIX/flexdll" flexdll "$_FLEXDLLVER" host
813+
apply_patches "$OCAMLSRC_UNIX" flexdll "$_FLEXDLLVER" host
805814
fi
806815

807816
if [ -z "$TARGETABIS" ]; then

0 commit comments

Comments
 (0)