From 0d69d847a42cc37fb248830e4b2d97f2efd12e61 Mon Sep 17 00:00:00 2001 From: Savannah Bailey Date: Fri, 19 Sep 2025 16:11:42 +0100 Subject: [PATCH 1/7] Fix freebsd --- Makefile.pre.in | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 9f00ca1c0d541e..6c2d5963b13f0a 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3126,21 +3126,22 @@ JIT_DEPS = \ $(srcdir)/Tools/jit/*.py \ $(srcdir)/Python/executor_cases.c.h \ pyconfig.h - + +JIT_STENCIL_HEADER := ifneq ($(filter aarch64-apple-darwin%,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER := jit_stencils-aarch64-apple-darwin.h +JIT_STENCIL_HEADER = jit_stencils-aarch64-apple-darwin.h else ifneq ($(filter x86_64-apple-darwin%,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER := jit_stencils-x86_64-apple-darwin.h +JIT_STENCIL_HEADER = jit_stencils-x86_64-apple-darwin.h else ifeq ($(HOST_GNU_TYPE), aarch64-pc-windows-msvc) -JIT_STENCIL_HEADER := jit_stencils-aarch64-pc-windows-msvc.h +JIT_STENCIL_HEADER = jit_stencils-aarch64-pc-windows-msvc.h else ifeq ($(HOST_GNU_TYPE), i686-pc-windows-msvc) -JIT_STENCIL_HEADER := jit_stencils-i686-pc-windows-msvc.h +JIT_STENCIL_HEADER = jit_stencils-i686-pc-windows-msvc.h else ifeq ($(HOST_GNU_TYPE), x86_64-pc-windows-msvc) -JIT_STENCIL_HEADER := jit_stencils-x86_64-pc-windows-msvc.h +JIT_STENCIL_HEADER = jit_stencils-x86_64-pc-windows-msvc.h else ifneq ($(filter aarch64-%-linux-gnu,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER := jit_stencils-$(HOST_GNU_TYPE).h +JIT_STENCIL_HEADER = jit_stencils-$(HOST_GNU_TYPE).h else ifneq ($(filter x86_64-%-linux-gnu,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER := jit_stencils-$(HOST_GNU_TYPE).h +JIT_STENCIL_HEADER = jit_stencils-$(HOST_GNU_TYPE).h endif jit_stencils.h $(JIT_STENCIL_HEADER): $(JIT_DEPS) From 64ba8f3491a1d619ddb051107fed4461743e2d41 Mon Sep 17 00:00:00 2001 From: Savannah Bailey Date: Fri, 19 Sep 2025 16:14:01 +0100 Subject: [PATCH 2/7] Remove indentation --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 6c2d5963b13f0a..744548cd8ebe0d 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3127,7 +3127,7 @@ JIT_DEPS = \ $(srcdir)/Python/executor_cases.c.h \ pyconfig.h -JIT_STENCIL_HEADER := +JIT_STENCIL_HEADER := ifneq ($(filter aarch64-apple-darwin%,$(HOST_GNU_TYPE)),) JIT_STENCIL_HEADER = jit_stencils-aarch64-apple-darwin.h else ifneq ($(filter x86_64-apple-darwin%,$(HOST_GNU_TYPE)),) From b2b95d1db29e8f1f08861bdb2a33f694df808bf1 Mon Sep 17 00:00:00 2001 From: Savannah Bailey Date: Fri, 19 Sep 2025 16:30:24 +0100 Subject: [PATCH 3/7] Try again --- Makefile.pre.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in index 744548cd8ebe0d..c28cd8a3aa88c2 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3144,11 +3144,19 @@ else ifneq ($(filter x86_64-%-linux-gnu,$(HOST_GNU_TYPE)),) JIT_STENCIL_HEADER = jit_stencils-$(HOST_GNU_TYPE).h endif +ifdef JIT_STENCIL_HEADER jit_stencils.h $(JIT_STENCIL_HEADER): $(JIT_DEPS) @REGEN_JIT_COMMAND@ Python/jit.o: $(srcdir)/Python/jit.c jit_stencils.h $(JIT_STENCIL_HEADER) $(CC) -c $(PY_CORE_CFLAGS) -o $@ $< +else +jit_stencils.h: $(JIT_DEPS) + @REGEN_JIT_COMMAND@ + +Python/jit.o: $(srcdir)/Python/jit.c jit_stencils.h + $(CC) -c $(PY_CORE_CFLAGS) -o $@ $< +endif .PHONY: regen-jit regen-jit: From 69f9202a073053bbb16206a1e08f0bf1c3d4b274 Mon Sep 17 00:00:00 2001 From: Savannah Bailey Date: Fri, 19 Sep 2025 21:52:26 +0100 Subject: [PATCH 4/7] move logic back into configure.ac for freebsd --- Makefile.pre.in | 19 ++----------------- configure | 33 +++++++++++++++++++++++++++++++++ configure.ac | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 17 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index c28cd8a3aa88c2..e444ce48816d99 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3127,24 +3127,9 @@ JIT_DEPS = \ $(srcdir)/Python/executor_cases.c.h \ pyconfig.h -JIT_STENCIL_HEADER := -ifneq ($(filter aarch64-apple-darwin%,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER = jit_stencils-aarch64-apple-darwin.h -else ifneq ($(filter x86_64-apple-darwin%,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER = jit_stencils-x86_64-apple-darwin.h -else ifeq ($(HOST_GNU_TYPE), aarch64-pc-windows-msvc) -JIT_STENCIL_HEADER = jit_stencils-aarch64-pc-windows-msvc.h -else ifeq ($(HOST_GNU_TYPE), i686-pc-windows-msvc) -JIT_STENCIL_HEADER = jit_stencils-i686-pc-windows-msvc.h -else ifeq ($(HOST_GNU_TYPE), x86_64-pc-windows-msvc) -JIT_STENCIL_HEADER = jit_stencils-x86_64-pc-windows-msvc.h -else ifneq ($(filter aarch64-%-linux-gnu,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER = jit_stencils-$(HOST_GNU_TYPE).h -else ifneq ($(filter x86_64-%-linux-gnu,$(HOST_GNU_TYPE)),) -JIT_STENCIL_HEADER = jit_stencils-$(HOST_GNU_TYPE).h -endif +JIT_STENCIL_HEADER := @JIT_STENCIL_HEADER@ -ifdef JIT_STENCIL_HEADER +ifneq ($(JIT_STENCIL_HEADER),) jit_stencils.h $(JIT_STENCIL_HEADER): $(JIT_DEPS) @REGEN_JIT_COMMAND@ diff --git a/configure b/configure index 733bb00cdb0264..b3caffc398a966 100755 --- a/configure +++ b/configure @@ -644,6 +644,7 @@ ac_includes_default="\ ac_header_c_list= ac_subst_vars='LTLIBOBJS MODULE_BLOCK +JIT_STENCIL_HEADER MODULE_XXLIMITED_35_FALSE MODULE_XXLIMITED_35_TRUE MODULE_XXLIMITED_FALSE @@ -34190,6 +34191,38 @@ fi printf "%s\n" "$py_cv_module_xxlimited_35" >&6; } +# Determine JIT stencil header based on platform +JIT_STENCIL_HEADER="" +case "$host" in + aarch64-apple-darwin*) + JIT_STENCIL_HEADER="jit_stencils-aarch64-apple-darwin.h" + ;; + x86_64-apple-darwin*) + JIT_STENCIL_HEADER="jit_stencils-x86_64-apple-darwin.h" + ;; + aarch64-pc-windows-msvc) + JIT_STENCIL_HEADER="jit_stencils-aarch64-pc-windows-msvc.h" + ;; + i686-pc-windows-msvc) + JIT_STENCIL_HEADER="jit_stencils-i686-pc-windows-msvc.h" + ;; + x86_64-pc-windows-msvc) + JIT_STENCIL_HEADER="jit_stencils-x86_64-pc-windows-msvc.h" + ;; + aarch64-*-linux-gnu) + JIT_STENCIL_HEADER="jit_stencils-$host.h" + ;; + x86_64-*-linux-gnu) + JIT_STENCIL_HEADER="jit_stencils-$host.h" + ;; + *) + # Unsupported platform - leave empty for fallback + JIT_STENCIL_HEADER="" + ;; +esac + + + # substitute multiline block, must come after last PY_STDLIB_MOD() diff --git a/configure.ac b/configure.ac index 72808127f86e97..0ab97e59ae0cc4 100644 --- a/configure.ac +++ b/configure.ac @@ -8171,6 +8171,38 @@ dnl Emscripten does not support shared libraries yet. PY_STDLIB_MOD([xxlimited], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) PY_STDLIB_MOD([xxlimited_35], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) +# Determine JIT stencil header based on platform +JIT_STENCIL_HEADER="" +case "$host" in + aarch64-apple-darwin*) + JIT_STENCIL_HEADER="jit_stencils-aarch64-apple-darwin.h" + ;; + x86_64-apple-darwin*) + JIT_STENCIL_HEADER="jit_stencils-x86_64-apple-darwin.h" + ;; + aarch64-pc-windows-msvc) + JIT_STENCIL_HEADER="jit_stencils-aarch64-pc-windows-msvc.h" + ;; + i686-pc-windows-msvc) + JIT_STENCIL_HEADER="jit_stencils-i686-pc-windows-msvc.h" + ;; + x86_64-pc-windows-msvc) + JIT_STENCIL_HEADER="jit_stencils-x86_64-pc-windows-msvc.h" + ;; + aarch64-*-linux-gnu) + JIT_STENCIL_HEADER="jit_stencils-$host.h" + ;; + x86_64-*-linux-gnu) + JIT_STENCIL_HEADER="jit_stencils-$host.h" + ;; + *) + # Unsupported platform - leave empty for fallback + JIT_STENCIL_HEADER="" + ;; +esac + +AC_SUBST([JIT_STENCIL_HEADER]) + # substitute multiline block, must come after last PY_STDLIB_MOD() AC_SUBST([MODULE_BLOCK]) From 9f51d6b3053428a940c683b6acef2205c65ae026 Mon Sep 17 00:00:00 2001 From: Savannah Bailey Date: Fri, 19 Sep 2025 22:26:07 +0100 Subject: [PATCH 5/7] Remove unsupported syntax for freebsd --- Makefile.pre.in | 14 ++---------- configure | 58 +++++++++++++++++++++++++------------------------ configure.ac | 58 +++++++++++++++++++++++++------------------------ 3 files changed, 62 insertions(+), 68 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index e444ce48816d99..51c5bec893ba69 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3127,21 +3127,11 @@ JIT_DEPS = \ $(srcdir)/Python/executor_cases.c.h \ pyconfig.h -JIT_STENCIL_HEADER := @JIT_STENCIL_HEADER@ - -ifneq ($(JIT_STENCIL_HEADER),) -jit_stencils.h $(JIT_STENCIL_HEADER): $(JIT_DEPS) - @REGEN_JIT_COMMAND@ - -Python/jit.o: $(srcdir)/Python/jit.c jit_stencils.h $(JIT_STENCIL_HEADER) - $(CC) -c $(PY_CORE_CFLAGS) -o $@ $< -else -jit_stencils.h: $(JIT_DEPS) +@JIT_STENCILS_H@: $(JIT_DEPS) @REGEN_JIT_COMMAND@ -Python/jit.o: $(srcdir)/Python/jit.c jit_stencils.h +Python/jit.o: $(srcdir)/Python/jit.c @JIT_STENCILS_H@ $(CC) -c $(PY_CORE_CFLAGS) -o $@ $< -endif .PHONY: regen-jit regen-jit: diff --git a/configure b/configure index b3caffc398a966..b8e9bd444eaa8c 100755 --- a/configure +++ b/configure @@ -644,7 +644,6 @@ ac_includes_default="\ ac_header_c_list= ac_subst_vars='LTLIBOBJS MODULE_BLOCK -JIT_STENCIL_HEADER MODULE_XXLIMITED_35_FALSE MODULE_XXLIMITED_35_TRUE MODULE_XXLIMITED_FALSE @@ -905,6 +904,7 @@ LDSHARED SHLIB_SUFFIX DSYMUTIL_PATH DSYMUTIL +JIT_STENCILS_H REGEN_JIT_COMMAND UNIVERSAL_ARCH_FLAGS WASM_STDLIB @@ -10876,6 +10876,7 @@ then : else case e in #( e) as_fn_append CFLAGS_NODIST " $jit_flags" REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . --cflags=\"$CFLAGS_JIT\"" + JIT_STENCILS_H="jit_stencils.h" if test "x$Py_DEBUG" = xtrue then : as_fn_append REGEN_JIT_COMMAND " --debug" @@ -10883,6 +10884,7 @@ fi ;; esac fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tier2_flags $jit_flags" >&5 printf "%s\n" "$tier2_flags $jit_flags" >&6; } @@ -34191,34 +34193,34 @@ fi printf "%s\n" "$py_cv_module_xxlimited_35" >&6; } -# Determine JIT stencil header based on platform -JIT_STENCIL_HEADER="" +# Determine JIT stencils header files based on target platform +JIT_STENCILS_H="jit_stencils.h" case "$host" in - aarch64-apple-darwin*) - JIT_STENCIL_HEADER="jit_stencils-aarch64-apple-darwin.h" - ;; - x86_64-apple-darwin*) - JIT_STENCIL_HEADER="jit_stencils-x86_64-apple-darwin.h" - ;; - aarch64-pc-windows-msvc) - JIT_STENCIL_HEADER="jit_stencils-aarch64-pc-windows-msvc.h" - ;; - i686-pc-windows-msvc) - JIT_STENCIL_HEADER="jit_stencils-i686-pc-windows-msvc.h" - ;; - x86_64-pc-windows-msvc) - JIT_STENCIL_HEADER="jit_stencils-x86_64-pc-windows-msvc.h" - ;; - aarch64-*-linux-gnu) - JIT_STENCIL_HEADER="jit_stencils-$host.h" - ;; - x86_64-*-linux-gnu) - JIT_STENCIL_HEADER="jit_stencils-$host.h" - ;; - *) - # Unsupported platform - leave empty for fallback - JIT_STENCIL_HEADER="" - ;; + aarch64-apple-darwin*) + JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-apple-darwin.h" + ;; + x86_64-apple-darwin*) + JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-apple-darwin.h" + ;; + aarch64-pc-windows-msvc) + JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-pc-windows-msvc.h" + ;; + i686-pc-windows-msvc) + JIT_STENCILS_H="jit_stencils.h jit_stencils-i686-pc-windows-msvc.h" + ;; + x86_64-pc-windows-msvc) + JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-pc-windows-msvc.h" + ;; + aarch64-*-linux-gnu) + JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" + ;; + x86_64-*-linux-gnu) + JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" + ;; + *) + # Unsupported platform - use generic header only + JIT_STENCILS_H="jit_stencils.h" + ;; esac diff --git a/configure.ac b/configure.ac index 0ab97e59ae0cc4..6a9cef1c713c3d 100644 --- a/configure.ac +++ b/configure.ac @@ -2787,11 +2787,13 @@ AS_VAR_IF([jit_flags], [AS_VAR_APPEND([CFLAGS_NODIST], [" $jit_flags"]) AS_VAR_SET([REGEN_JIT_COMMAND], ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . --cflags=\"$CFLAGS_JIT\""]) + AS_VAR_SET([JIT_STENCILS_H], ["jit_stencils.h"]) AS_VAR_IF([Py_DEBUG], [true], [AS_VAR_APPEND([REGEN_JIT_COMMAND], [" --debug"])], [])]) AC_SUBST([REGEN_JIT_COMMAND]) +AC_SUBST([JIT_STENCILS_H]) AC_MSG_RESULT([$tier2_flags $jit_flags]) if test "$disable_gil" = "yes" -a "$enable_experimental_jit" != "no"; then @@ -8171,37 +8173,37 @@ dnl Emscripten does not support shared libraries yet. PY_STDLIB_MOD([xxlimited], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) PY_STDLIB_MOD([xxlimited_35], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) -# Determine JIT stencil header based on platform -JIT_STENCIL_HEADER="" +# Determine JIT stencils header files based on target platform +JIT_STENCILS_H="jit_stencils.h" case "$host" in - aarch64-apple-darwin*) - JIT_STENCIL_HEADER="jit_stencils-aarch64-apple-darwin.h" - ;; - x86_64-apple-darwin*) - JIT_STENCIL_HEADER="jit_stencils-x86_64-apple-darwin.h" - ;; - aarch64-pc-windows-msvc) - JIT_STENCIL_HEADER="jit_stencils-aarch64-pc-windows-msvc.h" - ;; - i686-pc-windows-msvc) - JIT_STENCIL_HEADER="jit_stencils-i686-pc-windows-msvc.h" - ;; - x86_64-pc-windows-msvc) - JIT_STENCIL_HEADER="jit_stencils-x86_64-pc-windows-msvc.h" - ;; - aarch64-*-linux-gnu) - JIT_STENCIL_HEADER="jit_stencils-$host.h" - ;; - x86_64-*-linux-gnu) - JIT_STENCIL_HEADER="jit_stencils-$host.h" - ;; - *) - # Unsupported platform - leave empty for fallback - JIT_STENCIL_HEADER="" - ;; + aarch64-apple-darwin*) + JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-apple-darwin.h" + ;; + x86_64-apple-darwin*) + JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-apple-darwin.h" + ;; + aarch64-pc-windows-msvc) + JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-pc-windows-msvc.h" + ;; + i686-pc-windows-msvc) + JIT_STENCILS_H="jit_stencils.h jit_stencils-i686-pc-windows-msvc.h" + ;; + x86_64-pc-windows-msvc) + JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-pc-windows-msvc.h" + ;; + aarch64-*-linux-gnu) + JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" + ;; + x86_64-*-linux-gnu) + JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" + ;; + *) + # Unsupported platform - use generic header only + JIT_STENCILS_H="jit_stencils.h" + ;; esac -AC_SUBST([JIT_STENCIL_HEADER]) +AC_SUBST([JIT_STENCILS_H]) # substitute multiline block, must come after last PY_STDLIB_MOD() AC_SUBST([MODULE_BLOCK]) From b51c85dd0cda332af9d20325573dcf317c56069a Mon Sep 17 00:00:00 2001 From: Savannah Bailey Date: Fri, 19 Sep 2025 22:36:18 +0100 Subject: [PATCH 6/7] Remove redundant case --- Makefile.pre.in | 2 +- configure | 20 ++++++++------------ configure.ac | 20 ++++++++------------ 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 51c5bec893ba69..82e18a1ab6181f 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3130,7 +3130,7 @@ JIT_DEPS = \ @JIT_STENCILS_H@: $(JIT_DEPS) @REGEN_JIT_COMMAND@ -Python/jit.o: $(srcdir)/Python/jit.c @JIT_STENCILS_H@ +Python/jit.o: $(srcdir)/Python/jit.c jit_stencils.h @JIT_STENCILS_H@ $(CC) -c $(PY_CORE_CFLAGS) -o $@ $< .PHONY: regen-jit diff --git a/configure b/configure index b8e9bd444eaa8c..cd8f2f19c0b92c 100755 --- a/configure +++ b/configure @@ -34194,32 +34194,28 @@ printf "%s\n" "$py_cv_module_xxlimited_35" >&6; } # Determine JIT stencils header files based on target platform -JIT_STENCILS_H="jit_stencils.h" +JIT_STENCILS_H="" case "$host" in aarch64-apple-darwin*) - JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-apple-darwin.h" + JIT_STENCILS_H="jit_stencils-aarch64-apple-darwin.h" ;; x86_64-apple-darwin*) - JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-apple-darwin.h" + JIT_STENCILS_H="jit_stencils-x86_64-apple-darwin.h" ;; aarch64-pc-windows-msvc) - JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-pc-windows-msvc.h" + JIT_STENCILS_H="jit_stencils-aarch64-pc-windows-msvc.h" ;; i686-pc-windows-msvc) - JIT_STENCILS_H="jit_stencils.h jit_stencils-i686-pc-windows-msvc.h" + JIT_STENCILS_H="jit_stencils-i686-pc-windows-msvc.h" ;; x86_64-pc-windows-msvc) - JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-pc-windows-msvc.h" + JIT_STENCILS_H="jit_stencils-x86_64-pc-windows-msvc.h" ;; aarch64-*-linux-gnu) - JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" + JIT_STENCILS_H="jit_stencils-$host.h" ;; x86_64-*-linux-gnu) - JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" - ;; - *) - # Unsupported platform - use generic header only - JIT_STENCILS_H="jit_stencils.h" + JIT_STENCILS_H="jit_stencils-$host.h" ;; esac diff --git a/configure.ac b/configure.ac index 6a9cef1c713c3d..8312dc55084333 100644 --- a/configure.ac +++ b/configure.ac @@ -8174,32 +8174,28 @@ PY_STDLIB_MOD([xxlimited], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlop PY_STDLIB_MOD([xxlimited_35], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) # Determine JIT stencils header files based on target platform -JIT_STENCILS_H="jit_stencils.h" +JIT_STENCILS_H="" case "$host" in aarch64-apple-darwin*) - JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-apple-darwin.h" + JIT_STENCILS_H="jit_stencils-aarch64-apple-darwin.h" ;; x86_64-apple-darwin*) - JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-apple-darwin.h" + JIT_STENCILS_H="jit_stencils-x86_64-apple-darwin.h" ;; aarch64-pc-windows-msvc) - JIT_STENCILS_H="jit_stencils.h jit_stencils-aarch64-pc-windows-msvc.h" + JIT_STENCILS_H="jit_stencils-aarch64-pc-windows-msvc.h" ;; i686-pc-windows-msvc) - JIT_STENCILS_H="jit_stencils.h jit_stencils-i686-pc-windows-msvc.h" + JIT_STENCILS_H="jit_stencils-i686-pc-windows-msvc.h" ;; x86_64-pc-windows-msvc) - JIT_STENCILS_H="jit_stencils.h jit_stencils-x86_64-pc-windows-msvc.h" + JIT_STENCILS_H="jit_stencils-x86_64-pc-windows-msvc.h" ;; aarch64-*-linux-gnu) - JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" + JIT_STENCILS_H="jit_stencils-$host.h" ;; x86_64-*-linux-gnu) - JIT_STENCILS_H="jit_stencils.h jit_stencils-$host.h" - ;; - *) - # Unsupported platform - use generic header only - JIT_STENCILS_H="jit_stencils.h" + JIT_STENCILS_H="jit_stencils-$host.h" ;; esac From 1a55bdf04fd9ee105b1a72da7f70a4e223a3a376 Mon Sep 17 00:00:00 2001 From: Savannah Bailey Date: Fri, 19 Sep 2025 22:49:16 +0100 Subject: [PATCH 7/7] Add missing jit_stencils.h --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 82e18a1ab6181f..1eca541edaf7ba 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -3127,7 +3127,7 @@ JIT_DEPS = \ $(srcdir)/Python/executor_cases.c.h \ pyconfig.h -@JIT_STENCILS_H@: $(JIT_DEPS) +jit_stencils.h @JIT_STENCILS_H@: $(JIT_DEPS) @REGEN_JIT_COMMAND@ Python/jit.o: $(srcdir)/Python/jit.c jit_stencils.h @JIT_STENCILS_H@