|
90 | 90 | patch -p1 -i ${ROOT}/patch-xopen-source-ios-legacy.patch
|
91 | 91 | fi
|
92 | 92 |
|
93 |
| -# See https://github.com/python/cpython/pull/135146 |
94 |
| -# TODO(zanieb): Drop in 3.14b3 |
95 |
| -if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then |
96 |
| - patch -p1 -i ${ROOT}/patch-static-remote-debug-3.14.patch |
97 |
| -fi |
98 |
| - |
99 | 93 | # LIBTOOL_CRUFT is unused and breaks cross-compiling on macOS. Nuke it.
|
100 | 94 | # Submitted upstream at https://github.com/python/cpython/pull/101048.
|
101 | 95 | if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_11}" ]; then
|
@@ -485,7 +479,9 @@ if [ -n "${CPYTHON_OPTIMIZED}" ]; then
|
485 | 479 | fi
|
486 | 480 |
|
487 | 481 | # Respect CFLAGS during JIT compilation.
|
488 |
| - # Backports https://github.com/python/cpython/pull/134276 |
| 482 | + # |
| 483 | + # Backports https://github.com/python/cpython/pull/134276 which we're trying to get released |
| 484 | + # in 3.14, but is currently only in 3.15+. |
489 | 485 | if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then
|
490 | 486 | patch -p1 -i ${ROOT}/patch-jit-cflags-314.patch
|
491 | 487 | elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
|
|
653 | 649 | # We patched configure.ac above. Reflect those changes.
|
654 | 650 | autoconf
|
655 | 651 |
|
656 |
| -# Ensure `CFLAGS` are propagated to JIT compilation for 3.13+ |
657 |
| -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_3_14}" && "${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 \ |
658 | 665 | ./configure ${CONFIGURE_FLAGS}
|
659 | 666 |
|
660 | 667 | # Supplement produced Makefile with our modifications.
|
|
0 commit comments