File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 650650autoconf
651651
652652# Ensure `CFLAGS` are propagated to JIT compilation for 3.13+
653- CFLAGS=$CFLAGS CPPFLAGS=$CFLAGS CFLAGS_JIT=$CFLAGS LDFLAGS=$LDFLAGS \
653+ # (note this variable has no effect on 3.12 and earlier)
654+ if [[ -n " ${PYTHON_MEETS_MAXIMUM_VERSION_313} " ]]; then
655+ CFLAGS_JIT=" ${CFLAGS} "
656+ else
657+ # In 3.14+, the JIT compiler on x86-64 Linux uses a model that conflicts with `-fPIC`, so strip
658+ # it from the flags. See:
659+ # - https://github.com/python/cpython/issues/135690
660+ # - https://github.com/python/cpython/pull/130097
661+ CFLAGS_JIT=" ${CFLAGS// -fPIC/ } "
662+ fi
663+
664+ CFLAGS=$CFLAGS CPPFLAGS=$CFLAGS CFLAGS_JIT=$CFLAGS_JIT LDFLAGS=$LDFLAGS \
654665 ./configure ${CONFIGURE_FLAGS}
655666
656667# Supplement produced Makefile with our modifications.
You can’t perform that action at this time.
0 commit comments