diff --git a/cross/python311/Makefile b/cross/python311/Makefile index 48aa69b03687..9a8c572ec0c0 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -24,7 +24,7 @@ CONFIGURE_ARGS = --enable-shared CONFIGURE_ARGS += --without-static-libpython CONFIGURE_ARGS += --enable-ipv6 # installed pip is not on PATH -CONFIGURE_ARGS += --with-ensurepip=no +CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes CONFIGURE_ARGS += --with-build-python diff --git a/cross/python311/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch b/cross/python311/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch new file mode 100644 index 000000000000..33eea81d2af0 --- /dev/null +++ b/cross/python311/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch @@ -0,0 +1,16 @@ +# gcc 4.3.2 is lacking static_assert for c code (available for c++ code only). +# +# Since static_assert acts at compile time only, it does not affect the runtime +# behaviour when omitting the implementation. +# +--- Include/pymacro.h.orig 2023-08-24 12:09:18.000000000 +0000 ++++ Include/pymacro.h 2024-03-02 18:15:00.033365138 +0000 +@@ -21,6 +21,8 @@ + && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ + && __STDC_VERSION__ <= 201710L + # define static_assert _Static_assert ++#else ++# define static_assert + #endif + + /* Minimum value between x and y */ diff --git a/cross/python311/patches/ppc853x-5.2/001-revert-static_assert_undefined-fix-GH-94766.patch b/cross/python311/patches/ppc853x-5.2/001-revert-static_assert_undefined-fix-GH-94766.patch deleted file mode 100644 index 3b2c36f60c8b..000000000000 --- a/cross/python311/patches/ppc853x-5.2/001-revert-static_assert_undefined-fix-GH-94766.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- Include/pymacro.h-orig 2023-06-06 22:00:27.000000000 +0000 -+++ Include/pymacro.h 2023-07-03 19:36:57.974496974 +0000 -@@ -3,23 +3,20 @@ - - // gh-91782: On FreeBSD 12, if the _POSIX_C_SOURCE and _XOPEN_SOURCE macros are - // defined, disables C11 support and does not define --// the static_assert() macro. -+// the static_assert() macro. Define the static_assert() macro in Python until -+// suports C11: - // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255290 --// --// macOS <= 10.10 doesn't define static_assert in assert.h at all despite --// having C11 compiler support. --// --// static_assert is defined in glibc from version 2.16. Compiler support for --// the C11 _Static_assert keyword is in gcc >= 4.6. --// --// MSVC makes static_assert a keyword in C11-17, contrary to the standards. --// --// In C++11 and C2x, static_assert is a keyword, redefining is undefined --// behaviour. So only define if building as C (if __STDC_VERSION__ is defined), --// not C++, and only for C11-17. --#if !defined(static_assert) && (defined(__GNUC__) || defined(__clang__)) \ -- && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ -- && __STDC_VERSION__ <= 201710L -+#if defined(__FreeBSD__) && !defined(static_assert) -+# define static_assert _Static_assert -+#endif -+ -+// static_assert is defined in glibc from version 2.16. Before it requires -+// compiler support (gcc >= 4.6) and is called _Static_assert. -+// In C++ 11 static_assert is a keyword, redefining is undefined behaviour. -+#if (defined(__GLIBC__) \ -+ && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 16)) \ -+ && !(defined(__cplusplus) && __cplusplus >= 201103L) \ -+ && !defined(static_assert)) - # define static_assert _Static_assert - #endif -