Skip to content

Commit 69f9202

Browse files
move logic back into configure.ac for freebsd
1 parent b2b95d1 commit 69f9202

File tree

3 files changed

+67
-17
lines changed

3 files changed

+67
-17
lines changed

Makefile.pre.in

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3127,24 +3127,9 @@ JIT_DEPS = \
31273127
$(srcdir)/Python/executor_cases.c.h \
31283128
pyconfig.h
31293129

3130-
JIT_STENCIL_HEADER :=
3131-
ifneq ($(filter aarch64-apple-darwin%,$(HOST_GNU_TYPE)),)
3132-
JIT_STENCIL_HEADER = jit_stencils-aarch64-apple-darwin.h
3133-
else ifneq ($(filter x86_64-apple-darwin%,$(HOST_GNU_TYPE)),)
3134-
JIT_STENCIL_HEADER = jit_stencils-x86_64-apple-darwin.h
3135-
else ifeq ($(HOST_GNU_TYPE), aarch64-pc-windows-msvc)
3136-
JIT_STENCIL_HEADER = jit_stencils-aarch64-pc-windows-msvc.h
3137-
else ifeq ($(HOST_GNU_TYPE), i686-pc-windows-msvc)
3138-
JIT_STENCIL_HEADER = jit_stencils-i686-pc-windows-msvc.h
3139-
else ifeq ($(HOST_GNU_TYPE), x86_64-pc-windows-msvc)
3140-
JIT_STENCIL_HEADER = jit_stencils-x86_64-pc-windows-msvc.h
3141-
else ifneq ($(filter aarch64-%-linux-gnu,$(HOST_GNU_TYPE)),)
3142-
JIT_STENCIL_HEADER = jit_stencils-$(HOST_GNU_TYPE).h
3143-
else ifneq ($(filter x86_64-%-linux-gnu,$(HOST_GNU_TYPE)),)
3144-
JIT_STENCIL_HEADER = jit_stencils-$(HOST_GNU_TYPE).h
3145-
endif
3130+
JIT_STENCIL_HEADER := @JIT_STENCIL_HEADER@
31463131

3147-
ifdef JIT_STENCIL_HEADER
3132+
ifneq ($(JIT_STENCIL_HEADER),)
31483133
jit_stencils.h $(JIT_STENCIL_HEADER): $(JIT_DEPS)
31493134
@REGEN_JIT_COMMAND@
31503135

configure

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8171,6 +8171,38 @@ dnl Emscripten does not support shared libraries yet.
81718171
PY_STDLIB_MOD([xxlimited], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
81728172
PY_STDLIB_MOD([xxlimited_35], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
81738173

8174+
# Determine JIT stencil header based on platform
8175+
JIT_STENCIL_HEADER=""
8176+
case "$host" in
8177+
aarch64-apple-darwin*)
8178+
JIT_STENCIL_HEADER="jit_stencils-aarch64-apple-darwin.h"
8179+
;;
8180+
x86_64-apple-darwin*)
8181+
JIT_STENCIL_HEADER="jit_stencils-x86_64-apple-darwin.h"
8182+
;;
8183+
aarch64-pc-windows-msvc)
8184+
JIT_STENCIL_HEADER="jit_stencils-aarch64-pc-windows-msvc.h"
8185+
;;
8186+
i686-pc-windows-msvc)
8187+
JIT_STENCIL_HEADER="jit_stencils-i686-pc-windows-msvc.h"
8188+
;;
8189+
x86_64-pc-windows-msvc)
8190+
JIT_STENCIL_HEADER="jit_stencils-x86_64-pc-windows-msvc.h"
8191+
;;
8192+
aarch64-*-linux-gnu)
8193+
JIT_STENCIL_HEADER="jit_stencils-$host.h"
8194+
;;
8195+
x86_64-*-linux-gnu)
8196+
JIT_STENCIL_HEADER="jit_stencils-$host.h"
8197+
;;
8198+
*)
8199+
# Unsupported platform - leave empty for fallback
8200+
JIT_STENCIL_HEADER=""
8201+
;;
8202+
esac
8203+
8204+
AC_SUBST([JIT_STENCIL_HEADER])
8205+
81748206
# substitute multiline block, must come after last PY_STDLIB_MOD()
81758207
AC_SUBST([MODULE_BLOCK])
81768208

0 commit comments

Comments
 (0)