summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-12-21 20:05:47 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-30 08:47:12 +0000
commit16e2585e6df2d58664e9f1d8877ae60ec21bec88 (patch)
tree8b7116396be725e272b582b3d76018721b616d6b /meta/recipes-devtools/gcc
parent38a63c5ea06e553bf71dae0f47de9a151db8124c (diff)
downloadpoky-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.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch70
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 @@
1From 7ed24d12664319f34625a12fd8c0f729a0e71f5c Mon Sep 17 00:00:00 2001
2From: Auto Builder <ab@rdk>
3Date: Sun, 22 Dec 2019 02:58:24 +0000
4Subject: [PATCH] Fix up libsanitizer build with master glibc
5
62019-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
13Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b02486e0951bc0ed38310a03be73e479fc6f3e7a;hp=3feeac76ffc38427de2d7d086e2928e63eee2d44]
14Signed-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
20diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
21index 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
36diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
37index 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--
692.17.1
70