diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-04-28 10:43:42 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-05 11:07:26 +0100 |
commit | c88ce1ff0e18d6fb922713df5944e98ae77e332c (patch) | |
tree | 1fd0bda59e9cedbbf5ed8e75846a870a732d8310 /meta/recipes-devtools/binutils/binutils/fix-time64.patch | |
parent | ce460d24624c5fa100708762505028ecf995f179 (diff) | |
download | poky-c88ce1ff0e18d6fb922713df5944e98ae77e332c.tar.gz |
binutils: backport a patch to address failures when time64.inc is in use
(From OE-Core rev: e80a836be72d304aa2f47421882390263623b6fc)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/fix-time64.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/fix-time64.patch | 94 |
1 files changed, 94 insertions, 0 deletions
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 | |||