From 3809f94aca3a6ab8925318a4b3757eb3a0bf01c2 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Mon, 17 Nov 2025 09:47:44 +0700 Subject: [PATCH] Make cargo template dynamically linked --- recipes/core/profiled/recipe.toml | 6 +++++- recipes/core/redoxfs/recipe.toml | 6 +++++- recipes/demos/exampled/recipe.toml | 6 +++++- recipes/libs/redox-fatfs/recipe.toml | 6 +++++- src/cook/cook_build.rs | 2 +- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/recipes/core/profiled/recipe.toml b/recipes/core/profiled/recipe.toml index 1876ca359..18dc3cfc1 100644 --- a/recipes/core/profiled/recipe.toml +++ b/recipes/core/profiled/recipe.toml @@ -2,4 +2,8 @@ git = "https://gitlab.redox-os.org/redox-os/profiled.git" [build] -template = "cargo" +template = "custom" +script = """ +# Must be statically linked +cookbook_cargo +""" diff --git a/recipes/core/redoxfs/recipe.toml b/recipes/core/redoxfs/recipe.toml index 31fdb491e..c6609e329 100644 --- a/recipes/core/redoxfs/recipe.toml +++ b/recipes/core/redoxfs/recipe.toml @@ -2,4 +2,8 @@ git = "https://gitlab.redox-os.org/redox-os/redoxfs.git" [build] -template = "cargo" +template = "custom" +script = """ +# Must be statically linked +cookbook_cargo +""" diff --git a/recipes/demos/exampled/recipe.toml b/recipes/demos/exampled/recipe.toml index e35bc734d..a25312cb4 100644 --- a/recipes/demos/exampled/recipe.toml +++ b/recipes/demos/exampled/recipe.toml @@ -2,4 +2,8 @@ git = "https://gitlab.redox-os.org/redox-os/exampled.git" [build] -template = "cargo" +template = "custom" +script = """ +# Must be statically linked +cookbook_cargo +""" diff --git a/recipes/libs/redox-fatfs/recipe.toml b/recipes/libs/redox-fatfs/recipe.toml index 462ccfaa8..0052d19cd 100644 --- a/recipes/libs/redox-fatfs/recipe.toml +++ b/recipes/libs/redox-fatfs/recipe.toml @@ -1,4 +1,8 @@ [source] git = "https://gitlab.redox-os.org/redox-os/redox-fatfs.git" [build] -template = "cargo" +template = "custom" +script = """ +# Must be statically linked +cookbook_cargo +""" diff --git a/src/cook/cook_build.rs b/src/cook/cook_build.rs index 603e49f9b..acd349e44 100644 --- a/src/cook/cook_build.rs +++ b/src/cook/cook_build.rs @@ -298,7 +298,7 @@ pub fn build( cargoflags, } => { format!( - "PACKAGE_PATH={} cookbook_cargo {cargoflags}", + "DYNAMIC_INIT\nPACKAGE_PATH={} cookbook_cargo {cargoflags}", package_path.as_deref().unwrap_or(".") ) }