From 78f1d0351d1387cc9463dcdb8876bcbcfbed42bb Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sun, 13 Sep 2026 19:28:40 +0200 Subject: [PATCH] prefix: Move clang env to compiler option --- mk/prefix.mk | 4 ++-- recipes/core/relibc/recipe.toml | 1 + recipes/dev/gcc13/recipe.toml | 1 + recipes/dev/llvm-rt21/recipe.toml | 1 + recipes/dev/rust/recipe.toml | 1 + recipes/dev/wasi-libc/recipe.toml | 1 + 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mk/prefix.mk b/mk/prefix.mk index e1ced0a92..ac394e30e 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -406,7 +406,7 @@ else @echo "\033[1;36;49mBuilding wasip1-libc-install\033[0m" rm -rf "$@.partial" "$@" export REDOXER_TOOLCHAIN=$(ROOT)/$(PREFIX)/clang-install $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/clang-install/bin:$$PATH" \ - REDOXER_USE_CLANG=1 COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=wasm32-wasip1 COOKBOOK_CROSS_GNU_TARGET=wasm32-wasip1 && \ + COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=wasm32-wasip1 COOKBOOK_CROSS_GNU_TARGET=wasm32-wasip1 && \ $(REPO_BIN) cook host:wasi-libc cp -r "$(WASIP1_LIBC_TARGET)/stage/usr/". "$@.partial" mkdir -p "$@.partial/share/wasi-sysroot" @@ -453,7 +453,7 @@ else echo "--sysroot=$(ROOT)/$(PREFIX)/gcc-install" > "$@.partial/bin/$(GNU_TARGET).cfg" ln -s clang-21 "$@.partial/bin/$(GNU_TARGET)-clang" export PATH="$(ROOT)/$@.partial/bin:$$PATH" $(PREFIX_CONFIG) \ - COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(HOST_TARGET) REDOXER_USE_CLANG=1 && \ + COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \ $(REPO_BIN) cook llvm-rt21 cp -r "$(LLVM_RT_TARGET)/stage/usr/". "$@.partial" echo "--sysroot=/../$(GNU_TARGET)" > "$@.partial/bin/$(GNU_TARGET).cfg" diff --git a/recipes/core/relibc/recipe.toml b/recipes/core/relibc/recipe.toml index 4aba45310..8b164bb83 100644 --- a/recipes/core/relibc/recipe.toml +++ b/recipes/core/relibc/recipe.toml @@ -3,6 +3,7 @@ git = "https://gitlab.redox-os.org/redox-os/relibc.git" [build] template = "custom" +compiler = "gcc-no-lto" script = """ # rustup workaround https://github.com/rust-lang/rustup/issues/988 if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then diff --git a/recipes/dev/gcc13/recipe.toml b/recipes/dev/gcc13/recipe.toml index f03c5d7a3..481e06e12 100644 --- a/recipes/dev/gcc13/recipe.toml +++ b/recipes/dev/gcc13/recipe.toml @@ -17,6 +17,7 @@ autotools_recursive_regenerate -I"$(realpath ./config)" [build] template = "custom" +compiler = "gcc" dependencies = [ "libgmp", "libmpfr", diff --git a/recipes/dev/llvm-rt21/recipe.toml b/recipes/dev/llvm-rt21/recipe.toml index 65e0c1b89..8dfbd608b 100644 --- a/recipes/dev/llvm-rt21/recipe.toml +++ b/recipes/dev/llvm-rt21/recipe.toml @@ -3,6 +3,7 @@ same_as = "../llvm21" [build] template = "custom" +compiler = "clang" script = """ DYNAMIC_INIT diff --git a/recipes/dev/rust/recipe.toml b/recipes/dev/rust/recipe.toml index 8147b8524..93d5cc8f2 100644 --- a/recipes/dev/rust/recipe.toml +++ b/recipes/dev/rust/recipe.toml @@ -5,6 +5,7 @@ shallow_clone = true [build] template = "custom" +compiler = "gcc" dependencies = [ "llvm21", "zlib", diff --git a/recipes/dev/wasi-libc/recipe.toml b/recipes/dev/wasi-libc/recipe.toml index b866e6ef3..96c488e43 100644 --- a/recipes/dev/wasi-libc/recipe.toml +++ b/recipes/dev/wasi-libc/recipe.toml @@ -5,6 +5,7 @@ shallow_clone = true [build] template = "custom" +compiler = "clang" script = """ cookbook_cmake """