summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/debugedit/debugedit_5.1.bb (renamed from meta/recipes-devtools/debugedit/debugedit_5.0.bb)8
-rw-r--r--meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch56
-rw-r--r--meta/recipes-devtools/debugedit/files/0003-Makefile.am-do-not-update-manual.patch13
3 files changed, 9 insertions, 68 deletions
diff --git a/meta/recipes-devtools/debugedit/debugedit_5.0.bb b/meta/recipes-devtools/debugedit/debugedit_5.1.bb
index 63ad7babd9..5dc103f643 100644
--- a/meta/recipes-devtools/debugedit/debugedit_5.0.bb
+++ b/meta/recipes-devtools/debugedit/debugedit_5.1.bb
@@ -9,16 +9,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
9 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ 9 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
10 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" 10 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
11 11
12SRC_URI = "https://sourceware.org/ftp/debugedit/${PV}/debugedit-${PV}.tar.xz" 12SRC_URI = "https://sourceware.org/ftp/debugedit/${PV}/debugedit-${PV}.tar.xz \
13 "
13 14
14SRC_URI:append:libc-musl = "\ 15SRC_URI:append:libc-musl = "\
15 file://0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch \
16 file://0003-Makefile.am-do-not-update-manual.patch \ 16 file://0003-Makefile.am-do-not-update-manual.patch \
17 " 17 "
18 18
19SRC_URI[sha256sum] = "e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e" 19SRC_URI[sha256sum] = "ee9b688b2ed8fa62551c54cb5dc31aaa05853e7dedbd9e1237c77894ea5e3626"
20 20
21DEPENDS = "elfutils" 21DEPENDS = "elfutils xxhash"
22DEPENDS:append:libc-musl = " musl-legacy-error" 22DEPENDS:append:libc-musl = " musl-legacy-error"
23 23
24inherit pkgconfig autotools 24inherit pkgconfig autotools
diff --git a/meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch b/meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch
deleted file mode 100644
index 4463bd2324..0000000000
--- a/meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 3e05bbc1f7909ab6f529e66f0d0f70fb1e60583a Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 23 Mar 2023 11:55:53 +0800
4Subject: [PATCH 2/2] sepdebugcrcfix.c: do not use 64bit variants
5
6configure.ac checks for largefile support via AC_SYS_LARGEFILE
7already, therefore use off_t, open and lseek instead of 64bit
8variants. Musl e.g. does not define them without _LARGEFILE64_SOURCE
9and error is not seen on glibc because _GNU_SOURCE defines
10_LARGEFILE64_SOURCE.
11
12This patch is marked as inappropriate as debugedit obviously only
13wants to support glibc or some glibc compatible libcs. We can see
14this from the error() usage. And this patch is only for musl.
15
16Upstream-Status: Inappropriate [OE Specific]
17
18Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
19---
20 tools/sepdebugcrcfix.c | 6 +++---
21 1 file changed, 3 insertions(+), 3 deletions(-)
22
23diff --git a/tools/sepdebugcrcfix.c b/tools/sepdebugcrcfix.c
24index c4a9d56..882e5f5 100644
25--- a/tools/sepdebugcrcfix.c
26+++ b/tools/sepdebugcrcfix.c
27@@ -144,7 +144,7 @@ crc32 (const char *fname, const char *base_fname, uint32_t *crcp)
28 error (0, errno, _("cannot open \"%s\""), debugname);
29 return false;
30 }
31- off64_t size = lseek64 (fd, 0, SEEK_END);
32+ off_t size = lseek (fd, 0, SEEK_END);
33 if (size == -1)
34 {
35 error (0, errno, _("cannot get size of \"%s\""), debugname);
36@@ -289,7 +289,7 @@ process (Elf *elf, int fd, const char *fname)
37 return true;
38 }
39 updated_count++;
40- off64_t seekto = (shdr->sh_offset + data->d_off
41+ off_t seekto = (shdr->sh_offset + data->d_off
42 + (crcp - (const uint8_t *) data->d_buf));
43 uint32_t crc_targetendian = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB
44 ? htole32 (crc) : htobe32 (crc));
45@@ -361,7 +361,7 @@ main (int argc, char **argv)
46 error (0, errno, _("cannot chmod \"%s\" to make sure we can read and write"), fname);
47
48 bool failed = false;
49- int fd = open64 (fname, O_RDWR);
50+ int fd = open (fname, O_RDWR);
51 if (fd == -1)
52 {
53 error (0, errno, _("cannot open \"%s\""), fname);
54--
552.17.1
56
diff --git a/meta/recipes-devtools/debugedit/files/0003-Makefile.am-do-not-update-manual.patch b/meta/recipes-devtools/debugedit/files/0003-Makefile.am-do-not-update-manual.patch
index de467f5365..d0414f739a 100644
--- a/meta/recipes-devtools/debugedit/files/0003-Makefile.am-do-not-update-manual.patch
+++ b/meta/recipes-devtools/debugedit/files/0003-Makefile.am-do-not-update-manual.patch
@@ -1,7 +1,7 @@
1From 4f0d7d2f4900ce8555e09854dc681278b7a3d9a9 Mon Sep 17 00:00:00 2001 1From b2715c3f4d28fab1c238086d9b5435e269b06301 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 23 Mar 2023 13:09:23 +0800 3Date: Thu, 23 Mar 2023 13:09:23 +0800
4Subject: [PATCH 3/3] Makefile.am: do not update manual 4Subject: [PATCH] Makefile.am: do not update manual
5 5
6The tarball ships these manuals, no need to re-generate them. 6The tarball ships these manuals, no need to re-generate them.
7We have local patches for debugedit.c and sepdebugcrcfix.c, 7We have local patches for debugedit.c and sepdebugcrcfix.c,
@@ -20,7 +20,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
20 1 file changed, 30 deletions(-) 20 1 file changed, 30 deletions(-)
21 21
22diff --git a/Makefile.am b/Makefile.am 22diff --git a/Makefile.am b/Makefile.am
23index 98b2f20..f91deea 100644 23index c590edf..692e016 100644
24--- a/Makefile.am 24--- a/Makefile.am
25+++ b/Makefile.am 25+++ b/Makefile.am
26@@ -52,36 +52,6 @@ sepdebugcrcfix_LDADD = @LIBELF_LIBS@ 26@@ -52,36 +52,6 @@ sepdebugcrcfix_LDADD = @LIBELF_LIBS@
@@ -58,8 +58,5 @@ index 98b2f20..f91deea 100644
58- esac 58- esac
59- 59-
60 noinst_HEADERS= tools/ansidecl.h \ 60 noinst_HEADERS= tools/ansidecl.h \
61 tools/hashtab.h \ 61 tools/hashtab.h
62 tools/md5.h \ 62
63--
642.17.1
65