-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! TMP Add patches for 5.2.0~beta2
- Loading branch information
Showing
14 changed files
with
66 additions
and
13 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0001-Add-missing-defined-in-preprocessor-test.patch
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,7 +1,7 @@ | ||
From 8300488c8891138da0bb490f1e74aaa9acfe11bd Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Tue, 27 Feb 2024 16:14:38 +0100 | ||
Subject: [PATCH 01/13] Add missing `defined` in preprocessor test | ||
Subject: [PATCH 01/14] Add missing `defined` in preprocessor test | ||
|
||
When `HAS_CLOCK_GETTIME_NSEC_NP` is not defined, | ||
`#elif HAS_CLOCK_GETTIME_NSEC_NP` triggers a warning | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0002-Include-config.h-before-HAS_GETTIMEOFDAY-is-tested.patch
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,7 +1,7 @@ | ||
From 3a811f54eb8b087ccbcebf40898053c37afec2a5 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Tue, 27 Feb 2024 16:22:58 +0100 | ||
Subject: [PATCH 02/13] Include `config.h` before `HAS_GETTIMEOFDAY` is tested | ||
Subject: [PATCH 02/14] Include `config.h` before `HAS_GETTIMEOFDAY` is tested | ||
|
||
Also remove a duplicate `errno.h` | ||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0003-Detect-and-use-CC-.-_FOR_BUILD-to-build-sak.patch
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,7 +1,7 @@ | ||
From 7353c75e772ad2beed7d4f9344e7d777d2786556 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Wed, 21 Feb 2024 18:47:12 +0100 | ||
Subject: [PATCH 03/13] Detect and use {CC,...}_FOR_BUILD to build sak | ||
Subject: [PATCH 03/14] Detect and use {CC,...}_FOR_BUILD to build sak | ||
|
||
--- | ||
Makefile | 9 +- | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0004-Use-target-instead-of-host-to-detect-the-C-toolchain.patch
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,7 +1,7 @@ | ||
From 9454c7ed8a83504a2c6f6dd98937f08b37c9a7ad Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Thu, 22 Feb 2024 13:37:28 +0100 | ||
Subject: [PATCH 04/13] Use `target` instead of `host` to detect the C | ||
Subject: [PATCH 04/14] Use `target` instead of `host` to detect the C | ||
toolchain | ||
|
||
When building a cross-compiler, the runtime will run on the target, not | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0005-Use-target-instead-of-host-when-relevant-in-configur.patch
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,7 +1,7 @@ | ||
From 07915e1a0436afd7f63b05a1e37177a7acac5fbb Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Wed, 21 Feb 2024 19:05:44 +0100 | ||
Subject: [PATCH 05/13] Use `target` instead of `host` when relevant in | ||
Subject: [PATCH 05/14] Use `target` instead of `host` when relevant in | ||
configuration | ||
|
||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0006-WIP-Use-the-STRIP-command-automatically-detected-by-.patch
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,7 +1,7 @@ | ||
From f6f07d207f853931da0b86e6850e71459e7dfe55 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Fri, 23 Feb 2024 12:00:32 +0100 | ||
Subject: [PATCH 06/13] WIP Use the STRIP command automatically detected by | ||
Subject: [PATCH 06/14] WIP Use the STRIP command automatically detected by | ||
libtool | ||
|
||
libtool configuration will try and detect the `strip` for the code | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0007-Allow-ocaml-as-a-target-OS-to-configure-freestanding.patch
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,7 +1,7 @@ | ||
From 6e6c8b41f026e5c8932abd2f777688b84b659fc0 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Mon, 26 Feb 2024 11:51:11 +0100 | ||
Subject: [PATCH 07/13] Allow `ocaml` as a target OS to configure freestanding | ||
Subject: [PATCH 07/14] Allow `ocaml` as a target OS to configure freestanding | ||
cross-compilers | ||
|
||
Allow the use of *-*-ocaml or *-*-*-ocaml target triplets to stand for | ||
|
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,7 +1,7 @@ | ||
From 6d522758a2ead363666eeb5ddbd3b99b23cd3dc4 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Mon, 26 Feb 2024 12:06:45 +0100 | ||
Subject: [PATCH 08/13] Define OS type to None | ||
Subject: [PATCH 08/14] Define OS type to None | ||
|
||
--- | ||
configure | Bin 682882 -> 682932 bytes | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0009-Add-freestanding-targets-to-supported-configurations.patch
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,7 +1,7 @@ | ||
From 2b54182296fad1e9e77bc6a5406ced4850128364 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Mon, 26 Feb 2024 19:35:26 +0100 | ||
Subject: [PATCH 09/13] Add freestanding targets to supported configurations | ||
Subject: [PATCH 09/14] Add freestanding targets to supported configurations | ||
|
||
--- | ||
configure | Bin 682932 -> 683087 bytes | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0010-Check-that-the-configured-and-the-installed-OCaml-ar.patch
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,7 +1,7 @@ | ||
From 099399cee91a0a0930e51dcc6274aa1cbd7ba334 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Tue, 19 Mar 2024 19:14:29 +0100 | ||
Subject: [PATCH 10/13] Check that the configured and the installed OCaml are | ||
Subject: [PATCH 10/14] Check that the configured and the installed OCaml are | ||
compatible | ||
|
||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0011-Use-the-target-pkg-config-to-detect-zstd.patch
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,7 +1,7 @@ | ||
From 5d794e027ff9e2690622a9a2ce5ccba139451a02 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Wed, 20 Mar 2024 17:41:26 +0100 | ||
Subject: [PATCH 11/13] Use the target pkg-config to detect zstd | ||
Subject: [PATCH 11/14] Use the target pkg-config to detect zstd | ||
|
||
Make sure that we don't detect zstd on build when we are building a | ||
cross-compiler, as the native zstd has no reason to be compatible with | ||
|
2 changes: 1 addition & 1 deletion
2
patches/5.2.0~beta2/0012-WIP-Add-a-Makefile.cross-for-recipes-to-build-a-cros.patch
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,7 +1,7 @@ | ||
From bd0e90919cea8757301115da1698728dd89f4709 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Fri, 23 Feb 2024 16:56:07 +0100 | ||
Subject: [PATCH 12/13] WIP Add a Makefile.cross for recipes to build a | ||
Subject: [PATCH 12/14] WIP Add a Makefile.cross for recipes to build a | ||
cross-compiler | ||
|
||
Define cross.opt and cross-install targets | ||
|
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,7 +1,7 @@ | ||
From eefe2cd555f7ee8e6ca3008702f23e33a6cd3cab Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Fri, 12 Apr 2024 19:21:52 +0200 | ||
Subject: [PATCH 13/13] Set Max_domains to 1 | ||
Subject: [PATCH 13/14] Set Max_domains to 1 | ||
|
||
Solo5 is single-core with no scheduler, so avoid the useless memory | ||
waste | ||
|
53 changes: 53 additions & 0 deletions
53
patches/5.2.0~beta2/0014-Set-stack-as-non-executable-on-freestanding-targets.patch
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From e5be9f05c33da4c466bb01d2de34f1cec23d1706 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Hym <[email protected]> | ||
Date: Mon, 29 Apr 2024 18:21:24 +0200 | ||
Subject: [PATCH 14/14] Set stack as non-executable on freestanding targets | ||
|
||
--- | ||
asmcomp/amd64/emit.mlp | 2 +- | ||
asmcomp/arm64/emit.mlp | 2 +- | ||
runtime/amd64.S | 2 +- | ||
3 files changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp | ||
index 619ce9c3c5..19f896c1ac 100644 | ||
--- a/asmcomp/amd64/emit.mlp | ||
+++ b/asmcomp/amd64/emit.mlp | ||
@@ -1079,7 +1079,7 @@ let end_assembly() = | ||
D.size frametable (ConstSub (ConstThis, ConstLabel frametable)) | ||
end; | ||
|
||
- if system = S_linux then | ||
+ if system = S_linux || system = S_unknown then | ||
(* Mark stack as non-executable, PR#4564 *) | ||
D.section [".note.GNU-stack"] (Some "") [ "%progbits" ]; | ||
|
||
diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp | ||
index 1816f8c345..41769e4f93 100644 | ||
--- a/asmcomp/arm64/emit.mlp | ||
+++ b/asmcomp/arm64/emit.mlp | ||
@@ -1217,7 +1217,7 @@ let end_assembly () = | ||
emit_symbol_type emit_symbol lbl "object"; | ||
emit_symbol_size lbl; | ||
begin match Config.system with | ||
- | "linux" -> | ||
+ | "linux" | "none" -> | ||
(* Mark stack as non-executable *) | ||
` .section .note.GNU-stack,\"\",%progbits\n` | ||
| _ -> () | ||
diff --git a/runtime/amd64.S b/runtime/amd64.S | ||
index 49c712b167..be0856a72b 100644 | ||
--- a/runtime/amd64.S | ||
+++ b/runtime/amd64.S | ||
@@ -1386,7 +1386,7 @@ G(caml_negf_mask): | ||
G(caml_absf_mask): | ||
.quad 0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF | ||
|
||
-#if defined(SYS_linux) | ||
+#if defined(SYS_linux) || defined(SYS_none) | ||
/* Mark stack as non-executable, PR#4564 */ | ||
.section .note.GNU-stack,"",%progbits | ||
#endif | ||
-- | ||
2.43.0 | ||
|