diff options
-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.patch | 56 | ||||
-rw-r--r-- | meta/recipes-devtools/debugedit/files/0003-Makefile.am-do-not-update-manual.patch | 13 |
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 | ||
12 | SRC_URI = "https://sourceware.org/ftp/debugedit/${PV}/debugedit-${PV}.tar.xz" | 12 | SRC_URI = "https://sourceware.org/ftp/debugedit/${PV}/debugedit-${PV}.tar.xz \ |
13 | " | ||
13 | 14 | ||
14 | SRC_URI:append:libc-musl = "\ | 15 | SRC_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 | ||
19 | SRC_URI[sha256sum] = "e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e" | 19 | SRC_URI[sha256sum] = "ee9b688b2ed8fa62551c54cb5dc31aaa05853e7dedbd9e1237c77894ea5e3626" |
20 | 20 | ||
21 | DEPENDS = "elfutils" | 21 | DEPENDS = "elfutils xxhash" |
22 | DEPENDS:append:libc-musl = " musl-legacy-error" | 22 | DEPENDS:append:libc-musl = " musl-legacy-error" |
23 | 23 | ||
24 | inherit pkgconfig autotools | 24 | inherit 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 @@ | |||
1 | From 3e05bbc1f7909ab6f529e66f0d0f70fb1e60583a Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Thu, 23 Mar 2023 11:55:53 +0800 | ||
4 | Subject: [PATCH 2/2] sepdebugcrcfix.c: do not use 64bit variants | ||
5 | |||
6 | configure.ac checks for largefile support via AC_SYS_LARGEFILE | ||
7 | already, therefore use off_t, open and lseek instead of 64bit | ||
8 | variants. Musl e.g. does not define them without _LARGEFILE64_SOURCE | ||
9 | and error is not seen on glibc because _GNU_SOURCE defines | ||
10 | _LARGEFILE64_SOURCE. | ||
11 | |||
12 | This patch is marked as inappropriate as debugedit obviously only | ||
13 | wants to support glibc or some glibc compatible libcs. We can see | ||
14 | this from the error() usage. And this patch is only for musl. | ||
15 | |||
16 | Upstream-Status: Inappropriate [OE Specific] | ||
17 | |||
18 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
19 | --- | ||
20 | tools/sepdebugcrcfix.c | 6 +++--- | ||
21 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/tools/sepdebugcrcfix.c b/tools/sepdebugcrcfix.c | ||
24 | index 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 | -- | ||
55 | 2.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 @@ | |||
1 | From 4f0d7d2f4900ce8555e09854dc681278b7a3d9a9 Mon Sep 17 00:00:00 2001 | 1 | From b2715c3f4d28fab1c238086d9b5435e269b06301 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Thu, 23 Mar 2023 13:09:23 +0800 | 3 | Date: Thu, 23 Mar 2023 13:09:23 +0800 |
4 | Subject: [PATCH 3/3] Makefile.am: do not update manual | 4 | Subject: [PATCH] Makefile.am: do not update manual |
5 | 5 | ||
6 | The tarball ships these manuals, no need to re-generate them. | 6 | The tarball ships these manuals, no need to re-generate them. |
7 | We have local patches for debugedit.c and sepdebugcrcfix.c, | 7 | We 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 | ||
22 | diff --git a/Makefile.am b/Makefile.am | 22 | diff --git a/Makefile.am b/Makefile.am |
23 | index 98b2f20..f91deea 100644 | 23 | index 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 | -- | ||
64 | 2.17.1 | ||
65 | |||