diff options
author | Ross Burton <ross@burtonini.com> | 2021-11-12 14:02:35 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-13 16:08:07 +0000 |
commit | 1bbbd69d9f1600f53737f2c459a08eae0d74a42c (patch) | |
tree | 48a2ab17474125d416d66ac8a0c77a168d3e158d /meta/recipes-kernel | |
parent | f70f9a7f44676f722e2541e1ef1f064c942fffcb (diff) | |
download | openembedded-core-contrib-1bbbd69d9f1600f53737f2c459a08eae0d74a42c.tar.gz |
dtc: fix mingw build
Backport a patch to fix the build of fdtdump with mingw, which so the
tools now build successfully with mingw.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch | 40 | ||||
-rw-r--r-- | meta/recipes-kernel/dtc/dtc_1.6.1.bb | 3 |
2 files changed, 42 insertions, 1 deletions
diff --git a/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch new file mode 100644 index 0000000000..4c3e34b1ff --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch @@ -0,0 +1,40 @@ +Fix the build of fdtdump with mingw. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> +Date: Wed, 25 Aug 2021 16:13:50 +0400 +Subject: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With mingw64-gcc, the compiler complains with various warnings: +error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] + +Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> +Message-Id: <20210825121350.213551-1-marcandre.lureau@redhat.com> +Acked-by: Rob Herring <robh@kernel.org> +Signed-off-by: David Gibson <david@gibson.dropbear.id.au> +--- + fdtdump.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fdtdump.c b/fdtdump.c +index d9fb374..483f367 100644 +--- a/fdtdump.c ++++ b/fdtdump.c +@@ -21,7 +21,7 @@ + #define MAX_VERSION 17 + + #define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) +-#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) ++#define PALIGN(p, a) ((void *)(ALIGN((uintptr_t)(p), (a)))) + #define GET_CELL(p) (p += 4, *((const fdt32_t *)(p-4))) + + static const char *tagname(uint32_t tag) +-- +2.25.1 + diff --git a/meta/recipes-kernel/dtc/dtc_1.6.1.bb b/meta/recipes-kernel/dtc/dtc_1.6.1.bb index 6365f73e10..2610b26a94 100644 --- a/meta/recipes-kernel/dtc/dtc_1.6.1.bb +++ b/meta/recipes-kernel/dtc/dtc_1.6.1.bb @@ -7,7 +7,8 @@ LICENSE = "GPLv2 | BSD-2-Clause" LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" -SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master" +SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ + file://0001-fdtdump-fix-Werror-int-to-pointer-cast.patch" SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" |