diff options
| author | Khem Raj <raj.khem@gmail.com> | 2018-09-09 09:26:13 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-09-09 09:27:12 -0700 |
| commit | 038bf9d811f57a1a35c7eb39aaa1d6f332b10833 (patch) | |
| tree | 64467da3bcd2ceeafeaef79fc7a426831762c74c /recipes-devtools | |
| parent | f40abaad6ffa6bfbe9540cb2bd6ce0d695515240 (diff) | |
| download | meta-clang-038bf9d811f57a1a35c7eb39aaa1d6f332b10833.tar.gz | |
Revert "compiler-rt: Use pre-computed size of struct ustat for Linux"
This reverts commit 9a0bd29eac2be5f88e3e198929181d3591dd7ec7.
Diffstat (limited to 'recipes-devtools')
| -rw-r--r-- | recipes-devtools/clang/compiler-rt/0005-sanitizer-Use-pre-computed-size-of-struct-ustat-for-.patch | 64 | ||||
| -rw-r--r-- | recipes-devtools/clang/compiler-rt_git.bb | 1 |
2 files changed, 0 insertions, 65 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 | |||
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 3c98d34..c458836 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb | |||
| @@ -20,7 +20,6 @@ SRC_URI = "\ | |||
| 20 | file://0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch \ | 20 | file://0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch \ |
| 21 | file://0003-Disable-tsan-on-OE-glibc.patch \ | 21 | file://0003-Disable-tsan-on-OE-glibc.patch \ |
| 22 | file://0004-cmake-mips-Do-not-specify-target-with-OE.patch \ | 22 | file://0004-cmake-mips-Do-not-specify-target-with-OE.patch \ |
| 23 | file://0005-sanitizer-Use-pre-computed-size-of-struct-ustat-for-.patch \ | ||
| 24 | " | 23 | " |
| 25 | 24 | ||
| 26 | SRCREV_FORMAT = "compiler-rt" | 25 | SRCREV_FORMAT = "compiler-rt" |
