File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 649649# We patched configure.ac above. Reflect those changes.
650650autoconf
651651
652- # Ensure `CFLAGS` are propagated to JIT compilation for 3.13+
653- CFLAGS=$CFLAGS CPPFLAGS=$CFLAGS CFLAGS_JIT=$CFLAGS LDFLAGS=$LDFLAGS \
652+ # Ensure `CFLAGS` are propagated to JIT compilation for 3.13+ (note this variable has no effect on
653+ # 3.12 and earlier)
654+ CFLAGS_JIT=" ${CFLAGS} "
655+
656+ # In 3.14+, the JIT compiler on x86-64 Linux uses a model that conflicts with `-fPIC`, so strip it
657+ # from the flags. See:
658+ # - https://github.com/python/cpython/issues/135690
659+ # - https://github.com/python/cpython/pull/130097
660+ if [[ -n " ${PYTHON_MEETS_MINIMUM_VERSION_314} " && " ${TARGET_TRIPLE} " == x86_64-* ]]; then
661+ CFLAGS_JIT=" ${CFLAGS_JIT// -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