guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: u-boot: Fix build under Python 3.10.


From: guix-commits
Subject: 02/02: gnu: u-boot: Fix build under Python 3.10.
Date: Sun, 26 Mar 2023 16:29:40 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit 68793b702e4295d011c89e72826fd15ce18e0b95
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Tue Mar 21 09:59:37 2023 +0100

    gnu: u-boot: Fix build under Python 3.10.
    
    * gnu/packages/patches/u-boot-fix-build-python-3.10.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/bootloaders.scm (u-boot): Apply patch.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/bootloaders.scm                       |  1 +
 .../patches/u-boot-fix-build-python-3.10.patch     | 37 ++++++++++++++++++++++
 3 files changed, 39 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index c7a37814d9..d211db22c9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1930,6 +1930,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/tuxpaint-stamps-path.patch              \
   %D%/packages/patches/twinkle-bcg729.patch                    \
   %D%/packages/patches/u-boot-allow-disabling-openssl.patch    \
+  %D%/packages/patches/u-boot-fix-build-python-3.10.patch      \
   %D%/packages/patches/u-boot-infodocs-target.patch            \
   %D%/packages/patches/u-boot-patman-guix-integration.patch    \
   %D%/packages/patches/u-boot-nintendo-nes-serial.patch                \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index ac269807be..a9685a9ef9 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -655,6 +655,7 @@ tree binary files.  These are board description files used 
by Linux and BSD.")
                      %u-boot-allow-disabling-openssl-patch
                      %u-boot-sifive-prevent-relocating-initrd-fdt
                      %u-boot-rk3399-enable-emmc-phy-patch
+                     (search-patch "u-boot-fix-build-python-3.10.patch")
                      (search-patch "u-boot-infodocs-target.patch")
                      (search-patch "u-boot-patman-guix-integration.patch")))
               (method url-fetch)
diff --git a/gnu/packages/patches/u-boot-fix-build-python-3.10.patch 
b/gnu/packages/patches/u-boot-fix-build-python-3.10.patch
new file mode 100644
index 0000000000..7e5d6ba656
--- /dev/null
+++ b/gnu/packages/patches/u-boot-fix-build-python-3.10.patch
@@ -0,0 +1,37 @@
+This patch is backported from U-Boot 2023.01; remove when updating.
+
+From 7d01bb1c5a1daef0187c9ea276bde19a8d0e7fde Mon Sep 17 00:00:00 2001
+From: Michal Suchanek <msuchanek@suse.de>
+Date: Thu, 13 Oct 2022 22:43:41 +0200
+Subject: [PATCH] libfdt: Fix build with python 3.10
+
+Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in
+swig 4.10 but it is not clear when it will be released. There was a
+warning since python 3.8.
+
+Link: https://github.com/swig/swig/pull/2277
+
+Signed-off-by: Michal Suchanek <msuchanek@suse.de>
+Reviewed-by: Simon Glass <sjg@chromium.org>
+---
+ scripts/dtc/pylibfdt/libfdt.i_shipped | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped 
b/scripts/dtc/pylibfdt/libfdt.i_shipped
+index 27c29ea260..56cc5d48f4 100644
+--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
++++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
+@@ -7,6 +7,10 @@
+ 
+ %module libfdt
+ 
++%begin %{
++#define PY_SSIZE_T_CLEAN
++%}
++
+ %include <stdint.i>
+ 
+ %{
+-- 
+GitLab
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]