diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-12-21 20:05:47 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-30 08:47:12 +0000 |
commit | 16e2585e6df2d58664e9f1d8877ae60ec21bec88 (patch) | |
tree | 8b7116396be725e272b582b3d76018721b616d6b /meta/recipes-devtools/gcc | |
parent | 38a63c5ea06e553bf71dae0f47de9a151db8124c (diff) | |
download | poky-16e2585e6df2d58664e9f1d8877ae60ec21bec88.tar.gz |
gcc-sanitizers: Fix build with glibc 2.31
Backport a patch from latest gcc-9-branch to fix an API change in glibc
2.31, this patch wont be needed when upgrading to 9.3 or 10.x
(From OE-Core rev: d089f84d64b90776623e0e43d237ac3fcc6a0d7d)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-9.2.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch | 70 |
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-9.2.inc b/meta/recipes-devtools/gcc/gcc-9.2.inc index c6395998d5..926df11c27 100644 --- a/meta/recipes-devtools/gcc/gcc-9.2.inc +++ b/meta/recipes-devtools/gcc/gcc-9.2.inc | |||
@@ -64,6 +64,7 @@ SRC_URI = "\ | |||
64 | file://0034-fix-segmentation-fault-in-precompiled-header-generat.patch \ | 64 | file://0034-fix-segmentation-fault-in-precompiled-header-generat.patch \ |
65 | file://0035-Fix-for-testsuite-failure.patch \ | 65 | file://0035-Fix-for-testsuite-failure.patch \ |
66 | file://0036-Re-introduce-spe-commandline-options.patch \ | 66 | file://0036-Re-introduce-spe-commandline-options.patch \ |
67 | file://0037-Fix-up-libsanitizer-build-with-master-glibc.patch \ | ||
67 | file://CVE-2019-14250.patch \ | 68 | file://CVE-2019-14250.patch \ |
68 | file://CVE-2019-15847_1.patch \ | 69 | file://CVE-2019-15847_1.patch \ |
69 | file://CVE-2019-15847_2.patch \ | 70 | file://CVE-2019-15847_2.patch \ |
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch b/meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch new file mode 100644 index 0000000000..abe074c289 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 7ed24d12664319f34625a12fd8c0f729a0e71f5c Mon Sep 17 00:00:00 2001 | ||
2 | From: Auto Builder <ab@rdk> | ||
3 | Date: Sun, 22 Dec 2019 02:58:24 +0000 | ||
4 | Subject: [PATCH] Fix up libsanitizer build with master glibc | ||
5 | |||
6 | 2019-11-26 Jakub Jelinek <jakub@redhat.com> | ||
7 | |||
8 | PR sanitizer/92154 | ||
9 | * sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick | ||
10 | llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce. | ||
11 | * sanitizer_common/sanitizer_platform_limits_posix.cpp: Likewise. | ||
12 | |||
13 | Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b02486e0951bc0ed38310a03be73e479fc6f3e7a;hp=3feeac76ffc38427de2d7d086e2928e63eee2d44] | ||
14 | Signed-off-by: Auto Builder <ab@rdk> | ||
15 | --- | ||
16 | .../sanitizer_platform_limits_posix.cc | 5 +++-- | ||
17 | .../sanitizer_platform_limits_posix.h | 15 +-------------- | ||
18 | 2 files changed, 4 insertions(+), 16 deletions(-) | ||
19 | |||
20 | diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
21 | index 6cd4a5bac..d823a1219 100644 | ||
22 | --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
23 | +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
24 | @@ -1156,8 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); | ||
25 | CHECK_SIZE_AND_OFFSET(ipc_perm, gid); | ||
26 | CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); | ||
27 | CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); | ||
28 | -#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) | ||
29 | -/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ | ||
30 | +#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) | ||
31 | +/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit | ||
32 | + on many architectures. */ | ||
33 | CHECK_SIZE_AND_OFFSET(ipc_perm, mode); | ||
34 | #endif | ||
35 | |||
36 | diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | ||
37 | index 73af92af1..6a673a7c9 100644 | ||
38 | --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | ||
39 | +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | ||
40 | @@ -211,26 +211,13 @@ namespace __sanitizer { | ||
41 | u64 __unused1; | ||
42 | u64 __unused2; | ||
43 | #elif defined(__sparc__) | ||
44 | -#if defined(__arch64__) | ||
45 | unsigned mode; | ||
46 | - unsigned short __pad1; | ||
47 | -#else | ||
48 | - unsigned short __pad1; | ||
49 | - unsigned short mode; | ||
50 | unsigned short __pad2; | ||
51 | -#endif | ||
52 | unsigned short __seq; | ||
53 | unsigned long long __unused1; | ||
54 | unsigned long long __unused2; | ||
55 | -#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) | ||
56 | - unsigned int mode; | ||
57 | - unsigned short __seq; | ||
58 | - unsigned short __pad1; | ||
59 | - unsigned long __unused1; | ||
60 | - unsigned long __unused2; | ||
61 | #else | ||
62 | - unsigned short mode; | ||
63 | - unsigned short __pad1; | ||
64 | + unsigned int mode; | ||
65 | unsigned short __seq; | ||
66 | unsigned short __pad2; | ||
67 | #if defined(__x86_64__) && !defined(_LP64) | ||
68 | -- | ||
69 | 2.17.1 | ||
70 | |||