GH-137218: Fix Makefile to handle FreeBSD (fix for JIT stencil changes) (GH-139170)

This commit is contained in:
Savannah Bailey
2025-09-22 13:21:57 +01:00
committed by GitHub
parent 4fb338d844
commit 72d5ee0511
3 changed files with 63 additions and 18 deletions

View File

@@ -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,6 +8173,34 @@ 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 stencils header files based on target platform
JIT_STENCILS_H=""
case "$host" in
aarch64-apple-darwin*)
JIT_STENCILS_H="jit_stencils-aarch64-apple-darwin.h"
;;
x86_64-apple-darwin*)
JIT_STENCILS_H="jit_stencils-x86_64-apple-darwin.h"
;;
aarch64-pc-windows-msvc)
JIT_STENCILS_H="jit_stencils-aarch64-pc-windows-msvc.h"
;;
i686-pc-windows-msvc)
JIT_STENCILS_H="jit_stencils-i686-pc-windows-msvc.h"
;;
x86_64-pc-windows-msvc)
JIT_STENCILS_H="jit_stencils-x86_64-pc-windows-msvc.h"
;;
aarch64-*-linux-gnu)
JIT_STENCILS_H="jit_stencils-$host.h"
;;
x86_64-*-linux-gnu)
JIT_STENCILS_H="jit_stencils-$host.h"
;;
esac
AC_SUBST([JIT_STENCILS_H])
# substitute multiline block, must come after last PY_STDLIB_MOD()
AC_SUBST([MODULE_BLOCK])