|
72 | 72 | # configure doesn't support cross-compiling on LoongArch. Teach it. |
73 | 73 | if [ "${PYBUILD_PLATFORM}" != "macos" ]; then |
74 | 74 | case "${PYTHON_MAJMIN_VERSION}" in |
75 | | - 3.9|3.10|3.11) |
| 75 | + 3.10|3.11) |
76 | 76 | patch -p1 -i ${ROOT}/patch-configure-add-loongarch-triplet.patch |
77 | 77 | ;; |
78 | 78 | esac |
|
175 | 175 | # executable. This behavior is kinda suspect on all platforms, as it could be adding |
176 | 176 | # library dependencies that shouldn't need to be there. |
177 | 177 | if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then |
178 | | - if [ "${PYTHON_MAJMIN_VERSION}" = "3.9" ]; then |
179 | | - patch -p1 -i ${ROOT}/patch-python-link-modules-3.9.patch |
180 | | - elif [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then |
| 178 | + if [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then |
181 | 179 | patch -p1 -i ${ROOT}/patch-python-link-modules-3.10.patch |
182 | 180 | else |
183 | 181 | patch -p1 -i ${ROOT}/patch-python-link-modules-3.11.patch |
@@ -205,43 +203,19 @@ elif [ "${PYTHON_MAJMIN_VERSION}" = "3.11" ]; then |
205 | 203 | patch -p1 -i ${ROOT}/patch-tkinter-3.11.patch |
206 | 204 | elif [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then |
207 | 205 | patch -p1 -i ${ROOT}/patch-tkinter-3.10.patch |
208 | | -else |
209 | | - patch -p1 -i ${ROOT}/patch-tkinter-3.9.patch |
210 | 206 | fi |
211 | 207 |
|
212 | 208 | # Code that runs at ctypes module import time does not work with |
213 | 209 | # non-dynamic binaries. Patch Python to work around this. |
214 | 210 | # See https://bugs.python.org/issue37060. |
215 | 211 | patch -p1 -i ${ROOT}/patch-ctypes-static-binary.patch |
216 | 212 |
|
217 | | -# Older versions of Python need patching to work with modern mpdecimal. |
218 | | -if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_9}" ]; then |
219 | | - patch -p1 -i ${ROOT}/patch-decimal-modern-mpdecimal.patch |
220 | | -fi |
221 | | - |
222 | 213 | # We build against libedit instead of readline in all environments. |
223 | 214 | # |
224 | 215 | # On macOS, we use the system/SDK libedit, which is likely somewhat old. |
225 | 216 | # |
226 | 217 | # On Linux, we use our own libedit, which should be modern. |
227 | 218 | # |
228 | | -# CPython 3.10 added proper support for building against libedit outside of |
229 | | -# macOS. On older versions, we need to hack up readline.c to build against |
230 | | -# libedit. This patch breaks older libedit (as seen on macOS) so don't apply |
231 | | -# on macOS. |
232 | | -if [[ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_9}" && "${PYBUILD_PLATFORM}" != macos* ]]; then |
233 | | - # readline.c assumes that a modern readline API version has a free_history_entry(). |
234 | | - # but libedit does not. Change the #ifdef accordingly. |
235 | | - # |
236 | | - # Similarly, we invoke configure using readline, which sets |
237 | | - # HAVE_RL_COMPLETION_SUPPRESS_APPEND improperly. So hack that. This is a bug |
238 | | - # in our build system, as we should probably be invoking configure again when |
239 | | - # using libedit. |
240 | | - # |
241 | | - # Similar workaround for on_completion_display_matches_hook. |
242 | | - patch -p1 -i ${ROOT}/patch-readline-libedit.patch |
243 | | -fi |
244 | | - |
245 | 219 | if [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then |
246 | 220 | # Even though 3.10 is libedit aware, it isn't compatible with newer |
247 | 221 | # versions of libedit. We need to backport a 3.11 patch to teach the |
@@ -546,25 +520,6 @@ if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then |
546 | 520 | # as Homebrew or MacPorts. So nerf the check to prevent this. |
547 | 521 | CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_lib_intl_textdomain=no" |
548 | 522 |
|
549 | | - # CPython 3.9+ have proper support for weakly referenced symbols and |
550 | | - # runtime availability guards. CPython 3.8 will emit weak symbol references |
551 | | - # (this happens automatically when linking due to SDK version targeting). |
552 | | - # However CPython lacks the runtime availability guards for most symbols. |
553 | | - # This results in runtime failures when attempting to resolve/call the |
554 | | - # symbol. |
555 | | - if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_9}" ]; then |
556 | | - if [ "${TARGET_TRIPLE}" != "aarch64-apple-darwin" ]; then |
557 | | - for symbol in clock_getres clock_gettime clock_settime faccessat fchmodat fchownat fdopendir fstatat futimens getentropy linkat mkdirat openat preadv pwritev readlinkat renameat symlinkat unlinkat utimensat uttype; do |
558 | | - CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_${symbol}=no" |
559 | | - done |
560 | | - fi |
561 | | - |
562 | | - # mkfifoat, mknodat introduced in SDK 13.0. |
563 | | - for symbol in mkfifoat mknodat; do |
564 | | - CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_${symbol}=no" |
565 | | - done |
566 | | - fi |
567 | | - |
568 | 523 | if [ -n "${CROSS_COMPILING}" ]; then |
569 | 524 | # Python's configure doesn't support cross-compiling on macOS. So we need |
570 | 525 | # to explicitly set MACHDEP to avoid busted checks. The code for setting |
|
0 commit comments