diff options
Diffstat (limited to 'recipes-devtools/clang/compiler-rt/0005-sanitizer-Use-pre-computed-size-of-struct-ustat-for-.patch')
-rw-r--r-- | recipes-devtools/clang/compiler-rt/0005-sanitizer-Use-pre-computed-size-of-struct-ustat-for-.patch | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/recipes-devtools/clang/compiler-rt/0005-sanitizer-Use-pre-computed-size-of-struct-ustat-for-.patch b/recipes-devtools/clang/compiler-rt/0005-sanitizer-Use-pre-computed-size-of-struct-ustat-for-.patch deleted file mode 100644 index fa15d82..0000000 --- a/recipes-devtools/clang/compiler-rt/0005-sanitizer-Use-pre-computed-size-of-struct-ustat-for-.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 411c94c71d9569e8b9fa67b52987f19aded1ca15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Craig Topper <craig.topper@intel.com> | ||
3 | Date: Thu, 24 May 2018 17:59:47 +0000 | ||
4 | Subject: [PATCH] sanitizer: Use pre-computed size of struct ustat for Linux | ||
5 | |||
6 | <sys/ustat.h> has been removed from glibc 2.28 by: | ||
7 | |||
8 | commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 | ||
9 | Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> | ||
10 | Date: Sun Mar 18 11:28:59 2018 +0800 | ||
11 | |||
12 | Deprecate ustat syscall interface | ||
13 | This patch uses pre-computed size of struct ustat for Linux to fix | ||
14 | |||
15 | https://bugs.llvm.org/show_bug.cgi?id=37418 | ||
16 | |||
17 | Patch by H.J. Lu. | ||
18 | |||
19 | Differential Revision: https://reviews.llvm.org/D47281 | ||
20 | |||
21 | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333213 91177308-0d34-0410-b5e6-96231b3b80d8 | ||
22 | Upstream-Status: Backport [git://github.com/llvm-mirror/compiler-rt.git] | ||
23 | |||
24 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
25 | --- | ||
26 | lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- | ||
27 | 1 file changed, 13 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
30 | index f12e820..feb7bad 100644 | ||
31 | --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
32 | +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
33 | @@ -159,7 +159,6 @@ typedef struct user_fpregs elf_fpregset_t; | ||
34 | # include <sys/procfs.h> | ||
35 | #endif | ||
36 | #include <sys/user.h> | ||
37 | -#include <sys/ustat.h> | ||
38 | #include <linux/cyclades.h> | ||
39 | #include <linux/if_eql.h> | ||
40 | #include <linux/if_plip.h> | ||
41 | @@ -253,7 +252,19 @@ namespace __sanitizer { | ||
42 | #endif // SANITIZER_LINUX || SANITIZER_FREEBSD | ||
43 | |||
44 | #if SANITIZER_LINUX && !SANITIZER_ANDROID | ||
45 | - unsigned struct_ustat_sz = sizeof(struct ustat); | ||
46 | + // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which | ||
47 | + // has been removed from glibc 2.28. | ||
48 | +#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ | ||
49 | + || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ | ||
50 | + || defined(__x86_64__) | ||
51 | +#define SIZEOF_STRUCT_USTAT 32 | ||
52 | +#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ | ||
53 | + || defined(__powerpc__) || defined(__s390__) | ||
54 | +#define SIZEOF_STRUCT_USTAT 20 | ||
55 | +#else | ||
56 | +#error Unknown size of struct ustat | ||
57 | +#endif | ||
58 | + unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; | ||
59 | unsigned struct_rlimit64_sz = sizeof(struct rlimit64); | ||
60 | unsigned struct_statvfs64_sz = sizeof(struct statvfs64); | ||
61 | #endif // SANITIZER_LINUX && !SANITIZER_ANDROID | ||
62 | -- | ||
63 | 2.8.1 | ||
64 | |||