From ed2c18691812b846554ea784fee9b4c3f043b8f6 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 12 Feb 2026 18:11:53 -0700 Subject: [PATCH] libgmp: do not regenerate autotools on host --- recipes/libs/libgmp/recipe.toml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/libs/libgmp/recipe.toml b/recipes/libs/libgmp/recipe.toml index 054a9cda7..f89339ea7 100644 --- a/recipes/libs/libgmp/recipe.toml +++ b/recipes/libs/libgmp/recipe.toml @@ -5,13 +5,19 @@ [source] tar = "https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz" blake3 = "fffe4996713928ae19331c8ef39129e46d3bf5b7182820656fd4639435cd83a4" -script = """ -autotools_recursive_regenerate -""" [build] template = "custom" script = """ +# libgmp fails to regenerate autotools when building for host toolchain +# To workaround this, the source is copied to the build dir and autotools is +# only regenerated when not building for the host +rsync -a --delete "${COOKBOOK_SOURCE}/" ./ +COOKBOOK_SOURCE="${COOKBOOK_BUILD}" +if [ "$TARGET" != "$COOKBOOK_HOST_TARGET" ]; then + autotools_recursive_regenerate +fi + DYNAMIC_STATIC_INIT cookbook_configure -""" \ No newline at end of file +"""