summaryrefslogtreecommitdiff
path: root/external/python3
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2023-04-04 10:36:23 +0200
committerAndras Timar <andras.timar@collabora.com>2023-04-04 11:08:24 +0200
commit3d882e549c30f46e9742f53060dfc12c65614d11 (patch)
tree19d1a3bd331ad2b191aa6138b65e55357b517402 /external/python3
parentf91334fb949199e403036dc180d331f0c850b041 (diff)
python: build fix
Change-Id: Ie94383632b8b90d3c6e4507484e11cc80acc72a2
Diffstat (limited to 'external/python3')
-rw-r--r--external/python3/UnpackedTarball_python3.mk2
-rw-r--r--external/python3/macos-11.patch.058
-rw-r--r--external/python3/python-3.8-msvc-sdk.patch.1173
3 files changed, 0 insertions, 233 deletions
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 26a6a419af79..94950537386c 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -18,13 +18,11 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \
- external/python3/python-3.8-msvc-sdk.patch.1 \
external/python3/python-3.7.6-msvc-ssl.patch.1 \
external/python3/python-3.5.4-msvc-disable.patch.1 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/darwin.patch.0 \
- external/python3/macos-11.patch.0 \
))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/external/python3/macos-11.patch.0 b/external/python3/macos-11.patch.0
deleted file mode 100644
index 42b74f4b2f50..000000000000
--- a/external/python3/macos-11.patch.0
+++ /dev/null
@@ -1,58 +0,0 @@
--*- Mode: diff -*-
---- Mac/Tools/pythonw.c
-+++ Mac/Tools/pythonw.c
-@@ -121,6 +121,8 @@
- cpu_types[0] = CPU_TYPE_POWERPC;
- #elif defined(__i386__)
- cpu_types[0] = CPU_TYPE_X86;
-+#elif defined(__arm64__)
-+ cpu_types[0] = CPU_TYPE_ARM64;
- #else
- # error "Unknown CPU"
- #endif
---- setup.py
-+++ setup.py
-@@ -670,7 +670,10 @@
- add_dir_to_list(self.compiler.include_dirs,
- sysconfig.get_config_var("INCLUDEDIR"))
-
-- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
-+ if host_platform == 'darwin':
-+ system_lib_dirs = ['/usr/lib', macosx_sdk_root()+'/usr/lib']
-+ else:
-+ system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
- system_include_dirs = ['/usr/include']
- # lib_dirs and inc_dirs are used to search for files;
- # if a file is found in one of those directories, it can
---- Modules/_decimal/libmpdec/mpdecimal.h
-+++ Modules/_decimal/libmpdec/mpdecimal.h
-@@ -135,6 +135,9 @@
- #elif defined(__x86_64__)
- #define CONFIG_64
- #define ASM
-+ #elif defined(__arm64__)
-+ #define CONFIG_64
-+ #define ANSI
- #else
- #error "unknown architecture for universal build."
- #endif
---- Modules/_posixsubprocess.c
-+++ Modules/_posixsubprocess.c
-@@ -31,6 +31,8 @@
- # define SYS_getdents64 __NR_getdents64
- #endif
-
-+#include <limits.h>
-+
- #if defined(__sun) && defined(__SVR4)
- /* readdir64 is used to work around Solaris 9 bug 6395699. */
- # define readdir readdir64
-@@ -202,7 +202,7 @@
- #endif
- #ifdef _SC_OPEN_MAX
- local_max_fd = sysconf(_SC_OPEN_MAX);
-- if (local_max_fd == -1)
-+ if (local_max_fd == -1 || local_max_fd == LONG_MAX)
- #endif
- local_max_fd = 256; /* Matches legacy Lib/subprocess.py behavior. */
- return local_max_fd;
diff --git a/external/python3/python-3.8-msvc-sdk.patch.1 b/external/python3/python-3.8-msvc-sdk.patch.1
deleted file mode 100644
index fabdbb53ea63..000000000000
--- a/external/python3/python-3.8-msvc-sdk.patch.1
+++ /dev/null
@@ -1,173 +0,0 @@
-diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
-index 92987af713..d21f9b6e9d 100644
---- a/PC/pylauncher.rc
-+++ b/PC/pylauncher.rc
-@@ -4,7 +4,6 @@
-
- // Include the manifest file that indicates we support all
- // current versions of Windows.
--#include <winuser.h>
- 1 RT_MANIFEST "python.manifest"
-
- #if defined(PY_ICON)
-diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc
-index e5924a42da..fc607e9784 100644
---- a/PC/pyshellext.rc
-+++ b/PC/pyshellext.rc
-@@ -4,7 +4,6 @@
-
- // Include the manifest file that indicates we support all
- // current versions of Windows.
--#include <winuser.h>
- 1 RT_MANIFEST "python.manifest"
-
- /////////////////////////////////////////////////////////////////////////////
-diff --git a/PC/python_exe.rc b/PC/python_exe.rc
-index ae0b029b80..5eba89962b 100644
---- a/PC/python_exe.rc
-+++ b/PC/python_exe.rc
-@@ -4,7 +4,6 @@
-
- // Include the manifest file that indicates we support all
- // current versions of Windows.
--#include <winuser.h>
- 1 RT_MANIFEST "python.manifest"
-
- 1 ICON DISCARDABLE "icons\python.ico"
-diff --git a/PC/python_nt.rc b/PC/python_nt.rc
-index fac6105d8a..33cee42cb7 100644
---- a/PC/python_nt.rc
-+++ b/PC/python_nt.rc
-@@ -4,7 +4,6 @@
-
- // Include the manifest file that indicates we support all
- // current versions of Windows.
--#include <winuser.h>
- 2 RT_MANIFEST "python.manifest"
-
- // String Tables
-diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc
-index 88bf3592e1..562652be18 100644
---- a/PC/pythonw_exe.rc
-+++ b/PC/pythonw_exe.rc
-@@ -4,7 +4,6 @@
-
- // Include the manifest file that indicates we support all
- // current versions of Windows.
--#include <winuser.h>
- 1 RT_MANIFEST "python.manifest"
-
- 1 ICON DISCARDABLE "icons\pythonw.ico"
-diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
-index 84bd87d9d5..d2c18f8add 100644
---- a/PC/sqlite3.rc
-+++ b/PC/sqlite3.rc
-@@ -4,7 +4,6 @@
-
- // Include the manifest file that indicates we support all
- // current versions of Windows.
--#include <winuser.h>
- 2 RT_MANIFEST "python.manifest"
-
- /////////////////////////////////////////////////////////////////////////////
-diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
-index d21f9b6e9d..ff7e71e0fd 100644
---- a/PC/pylauncher.rc
-+++ b/PC/pylauncher.rc
-@@ -2,6 +2,11 @@
-
- #include "python_ver_rc.h"
-
-+#ifndef RT_MANIFEST
-+// bpo-45220: Cannot reliably #include RT_MANIFEST from
-+// anywhere, so we hardcode it
-+#define RT_MANIFEST 24
-+#endif
- // Include the manifest file that indicates we support all
- // current versions of Windows.
- 1 RT_MANIFEST "python.manifest"
-diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc
-index fc607e9784..af797ce95d 100644
---- a/PC/pyshellext.rc
-+++ b/PC/pyshellext.rc
-@@ -2,6 +2,12 @@
-
- #include "python_ver_rc.h"
-
-+#ifndef RT_MANIFEST
-+// bpo-45220: Cannot reliably #include RT_MANIFEST from
-+// anywhere, so we hardcode it
-+#define RT_MANIFEST 24
-+#endif
-+
- // Include the manifest file that indicates we support all
- // current versions of Windows.
- 1 RT_MANIFEST "python.manifest"
-diff --git a/PC/python_exe.rc b/PC/python_exe.rc
-index 5eba89962b..c3d3bff019 100644
---- a/PC/python_exe.rc
-+++ b/PC/python_exe.rc
-@@ -2,6 +2,12 @@
-
- #include "python_ver_rc.h"
-
-+#ifndef RT_MANIFEST
-+// bpo-45220: Cannot reliably #include RT_MANIFEST from
-+// anywhere, so we hardcode it
-+#define RT_MANIFEST 24
-+#endif
-+
- // Include the manifest file that indicates we support all
- // current versions of Windows.
- 1 RT_MANIFEST "python.manifest"
-diff --git a/PC/python_nt.rc b/PC/python_nt.rc
-index 33cee42cb7..539362cdc2 100644
---- a/PC/python_nt.rc
-+++ b/PC/python_nt.rc
-@@ -2,6 +2,12 @@
-
- #include "python_ver_rc.h"
-
-+#ifndef RT_MANIFEST
-+// bpo-45220: Cannot reliably #include RT_MANIFEST from
-+// anywhere, so we hardcode it
-+#define RT_MANIFEST 24
-+#endif
-+
- // Include the manifest file that indicates we support all
- // current versions of Windows.
- 2 RT_MANIFEST "python.manifest"
-diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc
-index 562652be18..38570b74fa 100644
---- a/PC/pythonw_exe.rc
-+++ b/PC/pythonw_exe.rc
-@@ -2,6 +2,12 @@
-
- #include "python_ver_rc.h"
-
-+#ifndef RT_MANIFEST
-+// bpo-45220: Cannot reliably #include RT_MANIFEST from
-+// anywhere, so we hardcode it
-+#define RT_MANIFEST 24
-+#endif
-+
- // Include the manifest file that indicates we support all
- // current versions of Windows.
- 1 RT_MANIFEST "python.manifest"
-diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
-index d2c18f8add..9ae2aa0f6f 100644
---- a/PC/sqlite3.rc
-+++ b/PC/sqlite3.rc
-@@ -2,6 +2,12 @@
-
- #include <winver.h>
-
-+#ifndef RT_MANIFEST
-+// bpo-45220: Cannot reliably #include RT_MANIFEST from
-+// anywhere, so we hardcode it
-+#define RT_MANIFEST 24
-+#endif
-+
- // Include the manifest file that indicates we support all
- // current versions of Windows.
- 2 RT_MANIFEST "python.manifest"