diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2023-03-23 16:11:15 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-27 15:44:02 +0100 |
| commit | 4ffcbe98e82c73c543aa46105413de2586aa1cee (patch) | |
| tree | f57162b00c9e866d491e6e8324f1a46fa89f7cfa /meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch | |
| parent | a94ca827c2066b22c746003f5144b89d28b13a1a (diff) | |
| download | poky-4ffcbe98e82c73c543aa46105413de2586aa1cee.tar.gz | |
debugedit: add recipe
This recipe provides find-debuginfo which is used by rpm, more
specifically rpmbuild.
RPM upstream removed find-debuginfo and switched to use debugedit
in the following commit.
https://github.com/rpm-software-management/rpm/commit/04b0805a756cdd9466fb9dc717846f5bf15518cc
Without debugedit, rpmbuild fails to generate debuginfo package when
%debug_package is added to spec file.
(From OE-Core rev: f7ada8b4d003473abce5b589cc38aec1e5e5f18a)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch')
| -rw-r--r-- | meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch | 56 |
1 files changed, 56 insertions, 0 deletions
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 new file mode 100644 index 0000000000..4463bd2324 --- /dev/null +++ b/meta/recipes-devtools/debugedit/files/0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch | |||
| @@ -0,0 +1,56 @@ | |||
| 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 | |||
