From d387d0a0b2725167dfd7ea1ff16aa0fad9581e59 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 23 Sep 2022 07:18:35 +0800 Subject: [PATCH 1/3] Update patch for v3.11.0rc2 --- Makefile | 2 +- patch/Python/Python.patch | 35 +++++++++++++---------------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 8d37975..cb726e8 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ BUILD_NUMBER=custom # PYTHON_VERSION is the full version number (e.g., 3.10.0b3) # PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0) # PYTHON_VER is the major/minor version (e.g., 3.10) -PYTHON_VERSION=3.11.0rc1 +PYTHON_VERSION=3.11.0rc2 PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+") PYTHON_VER=$(basename $(PYTHON_VERSION)) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 37f7532..d64440e 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -325,7 +325,7 @@ index ebe3711827..ea00c3176d 100644 return f"{osname}-{release}-{machine}" diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py -index 39b3530905..ef1fa18624 100644 +index 46087a98a2..ea8c228f65 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -47,7 +47,7 @@ @@ -459,7 +459,7 @@ index 05d9107b28..6df2bcf163 100644 proto = MyProto(loop=self.loop) server, path = self._make_ssl_unix_server( diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py -index 098a0da344..65aa7abe7c 100644 +index 0c49099bc4..c972bade4b 100644 --- a/Lib/test/test_asyncio/test_streams.py +++ b/Lib/test/test_asyncio/test_streams.py @@ -17,6 +17,7 @@ @@ -587,7 +587,7 @@ index daccbae5b4..607e40eb66 100644 'largefile', 'test requires %s bytes and a long time to run' % self.LARGE) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py -index 71926a5432..0ef83b9f51 100644 +index 350f4a57e2..54ef53a4c1 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -43,6 +43,7 @@ @@ -797,7 +797,7 @@ index a2c4ab5081..45927b3163 100644 'need os.get_terminal_size()') def test_stty_match(self): diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py -index 72e3394df2..832ee517f6 100644 +index b07954989f..ac634d421c 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1,5 +1,6 @@ @@ -816,7 +816,7 @@ index 72e3394df2..832ee517f6 100644 # avoid the 'echo' service on this platform, as there is an # assumption breaking non-standard port/protocol entry services = ('daytime', 'qotd', 'domain') -@@ -3552,7 +3553,7 @@ +@@ -3563,7 +3564,7 @@ def _testFDPassCMSG_LEN(self): self.createAndSendFDs(1) @@ -825,7 +825,7 @@ index 72e3394df2..832ee517f6 100644 @unittest.skipIf(AIX, "skipping, see issue #22397") @requireAttrs(socket, "CMSG_SPACE") def testFDPassSeparate(self): -@@ -3563,7 +3564,7 @@ +@@ -3574,7 +3575,7 @@ maxcmsgs=2) @testFDPassSeparate.client_skip @@ -834,7 +834,7 @@ index 72e3394df2..832ee517f6 100644 @unittest.skipIf(AIX, "skipping, see issue #22397") def _testFDPassSeparate(self): fd0, fd1 = self.newFDs(2) -@@ -3576,7 +3577,7 @@ +@@ -3587,7 +3588,7 @@ array.array("i", [fd1]))]), len(MSG)) @@ -843,7 +843,7 @@ index 72e3394df2..832ee517f6 100644 @unittest.skipIf(AIX, "skipping, see issue #22397") @requireAttrs(socket, "CMSG_SPACE") def testFDPassSeparateMinSpace(self): -@@ -3590,7 +3591,7 @@ +@@ -3601,7 +3602,7 @@ maxcmsgs=2, ignoreflags=socket.MSG_CTRUNC) @testFDPassSeparateMinSpace.client_skip @@ -852,7 +852,7 @@ index 72e3394df2..832ee517f6 100644 @unittest.skipIf(AIX, "skipping, see issue #22397") def _testFDPassSeparateMinSpace(self): fd0, fd1 = self.newFDs(2) -@@ -3614,7 +3615,7 @@ +@@ -3625,7 +3626,7 @@ nbytes = self.sendmsgToServer([msg]) self.assertEqual(nbytes, len(msg)) @@ -861,7 +861,7 @@ index 72e3394df2..832ee517f6 100644 def testFDPassEmpty(self): # Try to pass an empty FD array. Can receive either no array # or an empty array. -@@ -4434,28 +4435,33 @@ +@@ -4445,28 +4446,33 @@ pass @requireAttrs(socket.socket, "sendmsg") @@ -1239,7 +1239,7 @@ index 9132f13e81..36e00f7bfd 100644 diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c -index 3026bb6a34..42f503abe6 100644 +index 4847c1cb87..4a4c890846 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -1,3 +1,7 @@ @@ -1742,7 +1742,7 @@ index d74fb6deac..a30f74f03d 100755 # Blank kernel with real OS is always fine. ;; diff --git a/configure b/configure -index 91227f00be..d75c8c48fc 100755 +index 784f8d3060..2ca708e27b 100755 --- a/configure +++ b/configure @@ -836,6 +836,8 @@ @@ -2316,7 +2316,7 @@ index 91227f00be..d75c8c48fc 100755 diff --git a/configure.ac b/configure.ac -index 77fb609b74..72acc6e054 100644 +index ab5e1de6fa..99d3147959 100644 --- a/configure.ac +++ b/configure.ac @@ -545,6 +545,15 @@ @@ -2452,15 +2452,6 @@ index 77fb609b74..72acc6e054 100644 fi AC_SUBST(READELF) -@@ -2066,7 +2138,7 @@ - dnl build with WASM debug info if either Py_DEBUG is set or the target is - dnl node-debug or browser-debug. - AS_VAR_IF([Py_DEBUG], [yes], [wasm_debug=yes], [wasm_debug=no]) -- -+ - dnl Start with 20 MB and allow to grow - AS_VAR_APPEND([LDFLAGS_NODIST], [" -sALLOW_MEMORY_GROWTH -sTOTAL_MEMORY=20971520"]) - @@ -3129,6 +3201,9 @@ BLDSHARED="$LDSHARED" fi From ea77c270dadaa06f84fff87f9adf86b913bbd83e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 23 Sep 2022 07:56:21 +0800 Subject: [PATCH 2/3] Run CI on macOS 12. --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 21884bf..2a7dba5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -39,15 +39,15 @@ jobs: Includes: * Python ${{ env.PY_VERSION }}.? - * OpenSSL 1.1.1? + * OpenSSL 3.0.5 * BZip2 1.0.8 - * XZ 5.2.5 + * XZ 5.2.6 * LibFFI 3.4.2 outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} build: - runs-on: macOS-11.0 + runs-on: macOS-12.0 needs: make-release strategy: max-parallel: 4 From 7b4e73e5b9935aa811f6ad83e61bf59bffe547a7 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 23 Sep 2022 13:12:37 +0800 Subject: [PATCH 3/3] Ensure C pre-processor and compiler are correctly configured for x86 builds. --- .github/workflows/release.yaml | 2 +- Makefile | 22 +++++++++++----------- patch/libffi-3.4.2.patch | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2a7dba5..9d4b1fd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -47,7 +47,7 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} build: - runs-on: macOS-12.0 + runs-on: macOS-12 needs: make-release strategy: max-parallel: 4 diff --git a/Makefile b/Makefile index cb726e8..84bef70 100644 --- a/Makefile +++ b/Makefile @@ -221,15 +221,12 @@ TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))-simulato endif SDK_ROOT-$(target)=$$(shell xcrun --sdk $$(SDK-$(target)) --show-sdk-path) -CC-$(target)=xcrun --sdk $$(SDK-$(target)) clang +CC-$(target)=xcrun --sdk $$(SDK-$(target)) clang -target $$(TARGET_TRIPLE-$(target)) +CPP-$(target)=xcrun --sdk $$(SDK-$(target)) clang -target $$(TARGET_TRIPLE-$(target)) -E CXX-$(target)=xcrun --sdk $$(SDK-$(target)) clang AR-$(target)=xcrun --sdk $$(SDK-$(target)) ar -CFLAGS-$(target)=\ - -target $$(TARGET_TRIPLE-$(target)) \ - $$(CFLAGS-$(os)) -LDFLAGS-$(target)=\ - -target $$(TARGET_TRIPLE-$(target)) \ - $$(CFLAGS-$(os)) +CFLAGS-$(target)=$$(CFLAGS-$(os)) +LDFLAGS-$(target)=$$(CFLAGS-$(os)) ########################################################################### # Target: BZip2 @@ -550,6 +547,7 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \ ./configure \ AR="$$(AR-$(target))" \ CC="$$(CC-$(target))" \ + CPP="$$(CPP-$(target))" \ CXX="$$(CXX-$(target))" \ CFLAGS="$$(CFLAGS-$(target))" \ LDFLAGS="$$(LDFLAGS-$(target))" \ @@ -598,6 +596,7 @@ vars-$(target): @echo "TARGET_TRIPLE-$(target): $$(TARGET_TRIPLE-$(target))" @echo "SDK_ROOT-$(target): $$(SDK_ROOT-$(target))" @echo "CC-$(target): $$(CC-$(target))" + @echo "CPP-$(target): $$(CPP-$(target))" @echo "CFLAGS-$(target): $$(CFLAGS-$(target))" @echo "LDFLAGS-$(target): $$(LDFLAGS-$(target))" @echo "BZIP2_SRCDIR-$(target): $$(BZIP2_SRCDIR-$(target))" @@ -652,10 +651,9 @@ SDK_SLICE-$(sdk)=$$(OS_LOWER-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed " endif CC-$(sdk)=xcrun --sdk $(sdk) clang -CFLAGS-$(sdk)=\ - $$(CFLAGS-$(os)) -LDFLAGS-$(sdk)=\ - $$(CFLAGS-$(os)) +CPP-$(sdk)=xcrun --sdk $(sdk) clang -E +CFLAGS-$(sdk)=$$(CFLAGS-$(os)) +LDFLAGS-$(sdk)=$$(CFLAGS-$(os)) # Predeclare SDK constants that are used by the build-target macro @@ -770,6 +768,7 @@ $$(PYTHON_SRCDIR-$(sdk))/Makefile: \ cd $$(PYTHON_SRCDIR-$(sdk)) && \ ./configure \ CC="$$(CC-$(sdk))" \ + CPP="$$(CPP-$(sdk))" \ CFLAGS="$$(CFLAGS-$(sdk))" \ LDFLAGS="$$(LDFLAGS-$(sdk))" \ LIBLZMA_CFLAGS="-I$$(XZ_MERGE-$(sdk))/include" \ @@ -873,6 +872,7 @@ vars-$(sdk): @echo "SDK_ARCHES-$(sdk): $$(SDK_ARCHES-$(sdk))" @echo "SDK_SLICE-$(sdk): $$(SDK_SLICE-$(sdk))" @echo "CC-$(sdk): $$(CC-$(sdk))" + @echo "CPP-$(sdk): $$(CPP-$(sdk))" @echo "CFLAGS-$(sdk): $$(CFLAGS-$(sdk))" @echo "LDFLAGS-$(sdk): $$(LDFLAGS-$(sdk))" @echo "BZIP2_MERGE-$(sdk): $$(BZIP2_MERGE-$(sdk))" diff --git a/patch/libffi-3.4.2.patch b/patch/libffi-3.4.2.patch index f747c9a..7e3d9a2 100644 --- a/patch/libffi-3.4.2.patch +++ b/patch/libffi-3.4.2.patch @@ -222,10 +222,10 @@ index 9921b0d..5b60ccc 100755 - copy_src_platform_files(ios_simulator64_platform) - copy_src_platform_files(ios_device_platform) - copy_src_platform_files(ios_device64_platform) -+ copy_src_platform_files(ios_simulator_i386_platform) ++ # copy_src_platform_files(ios_simulator_i386_platform) + copy_src_platform_files(ios_simulator_x86_64_platform) + copy_src_platform_files(ios_simulator_arm64_platform) -+ copy_src_platform_files(ios_device_armv7_platform) ++ # copy_src_platform_files(ios_device_armv7_platform) + copy_src_platform_files(ios_device_arm64_platform) if generate_osx: - copy_src_platform_files(desktop64_platform) @@ -240,9 +240,9 @@ index 9921b0d..5b60ccc 100755 if generate_watchos: - copy_src_platform_files(watchos_simulator_platform) - copy_src_platform_files(watchos_device_platform) -+ copy_src_platform_files(watchos_simulator_i386_platform) ++ # copy_src_platform_files(watchos_simulator_i386_platform) + copy_src_platform_files(watchos_simulator_x86_64_platform) -+ copy_src_platform_files(watchos_simulator_arm64_platform) ++ # copy_src_platform_files(watchos_simulator_arm64_platform) + copy_src_platform_files(watchos_device_armv7k_platform) + copy_src_platform_files(watchos_device_arm64_32_platform) @@ -253,10 +253,10 @@ index 9921b0d..5b60ccc 100755 - build_target(ios_simulator64_platform, platform_headers) - build_target(ios_device_platform, platform_headers) - build_target(ios_device64_platform, platform_headers) -+ build_target(ios_simulator_i386_platform, platform_headers) ++ # build_target(ios_simulator_i386_platform, platform_headers) + build_target(ios_simulator_x86_64_platform, platform_headers) + build_target(ios_simulator_arm64_platform, platform_headers) -+ build_target(ios_device_armv7_platform, platform_headers) ++ # build_target(ios_device_armv7_platform, platform_headers) + build_target(ios_device_arm64_platform, platform_headers) if generate_osx: - build_target(desktop64_platform, platform_headers) @@ -271,10 +271,10 @@ index 9921b0d..5b60ccc 100755 if generate_watchos: - build_target(watchos_simulator_platform, platform_headers) - build_target(watchos_device_platform, platform_headers) -+ build_target(watchos_simulator_i386_platform, platform_headers) ++ # build_target(watchos_simulator_i386_platform, platform_headers) + build_target(watchos_simulator_x86_64_platform, platform_headers) + build_target(watchos_simulator_arm64_platform, platform_headers) -+ build_target(watchos_device_armv7k_platform, platform_headers) ++ # build_target(watchos_device_armv7k_platform, platform_headers) + build_target(watchos_device_arm64_32_platform, platform_headers) mkdir_p('darwin_common/include')