diff options
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.40.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/fix-time64.patch | 94 |
2 files changed, 95 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.40.inc b/meta/recipes-devtools/binutils/binutils-2.40.inc index 46de8e3ea9..3d6d8328e1 100644 --- a/meta/recipes-devtools/binutils/binutils-2.40.inc +++ b/meta/recipes-devtools/binutils/binutils-2.40.inc | |||
| @@ -35,5 +35,6 @@ SRC_URI = "\ | |||
| 35 | file://0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch \ | 35 | file://0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch \ |
| 36 | file://0015-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ | 36 | file://0015-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ |
| 37 | file://0016-CVE-2023-25586.patch \ | 37 | file://0016-CVE-2023-25586.patch \ |
| 38 | file://fix-time64.patch \ | ||
| 38 | " | 39 | " |
| 39 | S = "${WORKDIR}/git" | 40 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-devtools/binutils/binutils/fix-time64.patch b/meta/recipes-devtools/binutils/binutils/fix-time64.patch new file mode 100644 index 0000000000..0bfc977fd4 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/fix-time64.patch | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | From f6f19a39ecfe962cb8a05522c27f513308687a74 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | ||
| 3 | Date: Thu, 16 Feb 2023 19:00:47 -0800 | ||
| 4 | Subject: [PATCH] gprofng: PR30036 Build failure on aarch64 w/ glibc: symbol | ||
| 5 | `pwrite64' is already defined | ||
| 6 | |||
| 7 | gprofng/ChangeLog | ||
| 8 | 2023-02-16 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | ||
| 9 | |||
| 10 | PR gprofng/30036 | ||
| 11 | * libcollector/iotrace.c: Define creat64 and pwrite64 only when | ||
| 12 | __USE_LARGEFILE64 and __USE_FILE_OFFSET64 are not defined. | ||
| 13 | * libcollector/mmaptrace.c: Likewise for mmap64. | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=f6f19a39ecfe962cb8a05522c27f513308687a74] | ||
| 16 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 17 | --- | ||
| 18 | gprofng/libcollector/iotrace.c | 15 ++++++++------- | ||
| 19 | gprofng/libcollector/mmaptrace.c | 2 +- | ||
| 20 | 2 files changed, 9 insertions(+), 8 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c | ||
| 23 | index af90cc31f1a..d8439b02b3a 100644 | ||
| 24 | --- a/gprofng/libcollector/iotrace.c | ||
| 25 | +++ b/gprofng/libcollector/iotrace.c | ||
| 26 | @@ -1441,7 +1441,7 @@ creat (const char *path, mode_t mode) | ||
| 27 | } | ||
| 28 | |||
| 29 | /*------------------------------------------------------------- creat64 */ | ||
| 30 | -#if WSIZE(32) | ||
| 31 | +#if WSIZE(32) && !defined(__USE_LARGEFILE64) | ||
| 32 | int | ||
| 33 | creat64 (const char *path, mode_t mode) | ||
| 34 | { | ||
| 35 | @@ -2476,7 +2476,7 @@ __collector_pwrite_2_1 (int fildes, const void *buf, size_t nbyte, off_t offset) | ||
| 36 | return ret; | ||
| 37 | } | ||
| 38 | |||
| 39 | -#else | ||
| 40 | +#endif | ||
| 41 | ssize_t | ||
| 42 | pwrite (int fildes, const void *buf, size_t nbyte, off_t offset) | ||
| 43 | { | ||
| 44 | @@ -2497,11 +2497,10 @@ pwrite (int fildes, const void *buf, size_t nbyte, off_t offset) | ||
| 45 | POP_REENTRANCE (guard); | ||
| 46 | return ret; | ||
| 47 | } | ||
| 48 | -#endif | ||
| 49 | |||
| 50 | /*------------------------------------------------------------- pwrite64 */ | ||
| 51 | -#if WSIZE(32) | ||
| 52 | -#if !defined(__MUSL_LIBC) && ARCH(Intel) | ||
| 53 | +#if WSIZE(32) && ARCH(Intel) | ||
| 54 | +#if !defined(__MUSL_LIBC) | ||
| 55 | // map interposed symbol versions | ||
| 56 | |||
| 57 | SYMVER_ATTRIBUTE (__collector_pwrite64_2_2, pwrite64@GLIBC_2.2) | ||
| 58 | @@ -2547,8 +2546,9 @@ __collector_pwrite64_2_1 (int fildes, const void *buf, size_t nbyte, off64_t off | ||
| 59 | POP_REENTRANCE (guard); | ||
| 60 | return ret; | ||
| 61 | } | ||
| 62 | +#endif | ||
| 63 | |||
| 64 | -#else | ||
| 65 | +#if !defined(__USE_FILE_OFFSET64) | ||
| 66 | ssize_t | ||
| 67 | pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset) | ||
| 68 | { | ||
| 69 | @@ -2570,7 +2570,8 @@ pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset) | ||
| 70 | return ret; | ||
| 71 | } | ||
| 72 | #endif | ||
| 73 | -#endif /* SIZE(32) */ | ||
| 74 | + | ||
| 75 | +#endif /* SIZE(32) && ARCH(Intel) */ | ||
| 76 | |||
| 77 | /*------------------------------------------------------------- fgets */ | ||
| 78 | char* | ||
| 79 | diff --git a/gprofng/libcollector/mmaptrace.c b/gprofng/libcollector/mmaptrace.c | ||
| 80 | index 61613c21560..221b4e2d176 100644 | ||
| 81 | --- a/gprofng/libcollector/mmaptrace.c | ||
| 82 | +++ b/gprofng/libcollector/mmaptrace.c | ||
| 83 | @@ -1494,7 +1494,7 @@ mmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) | ||
| 84 | } | ||
| 85 | |||
| 86 | /*------------------------------------------------------------- mmap64 */ | ||
| 87 | -#if WSIZE(32) /* mmap64 only defined for non-64-bit */ | ||
| 88 | +#if WSIZE(32) && !defined(__USE_FILE_OFFSET64) | ||
| 89 | |||
| 90 | void * | ||
| 91 | mmap64 (void *start, size_t length, int prot, int flags, int fd, off64_t offset) | ||
| 92 | -- | ||
| 93 | 2.31.1 | ||
| 94 | |||
