summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-01-15 10:51:53 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-18 16:42:28 +0000
commit59d7bc14ef246097e128c57a163389a088d63ff9 (patch)
treeefbdb5a643429f6d62245325e50d9876732d5649 /meta/recipes-extended
parent787c77dd5cdbd0439bd6367980497f8a213a7336 (diff)
downloadpoky-59d7bc14ef246097e128c57a163389a088d63ff9.tar.gz
cpio: Fix gnulib alignof implementation on clang
Backport needed patches (From OE-Core rev: 49d328f2c696360759f00507b8fd5089b2f03e7c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch42
-rw-r--r--meta/recipes-extended/cpio/cpio_2.13.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch b/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch
new file mode 100644
index 0000000000..d637e70395
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch
@@ -0,0 +1,42 @@
1From 6e169bb5fadb73b4dd300b28e9cae1e1772855e8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 15 Jan 2023 02:05:23 -0800
4Subject: [PATCH] Use __alignof__ with clang.
5
6For clang versions < 8, use the same
7workaround as for GCC versions < 4.9.
8
9Backport couple of gnulib patches squashed
10
11[1] https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=57caf9541d98314102a55dd1cd0b8dc2be747471
12[2] https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=2af490a4c4ce85567296e27be6a9528964ca851e
13
14Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=57caf9541d98314102a55dd1cd0b8dc2be747471]
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 gnu/stdalign.in.h | 7 +++++--
19 1 file changed, 5 insertions(+), 2 deletions(-)
20
21diff --git a/gnu/stdalign.in.h b/gnu/stdalign.in.h
22index 5f56eee..e6e6a65 100644
23--- a/gnu/stdalign.in.h
24+++ b/gnu/stdalign.in.h
25@@ -53,9 +53,12 @@
26 #undef _Alignof
27
28 /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
29- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
30+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
31+ clang versions < 8.0.0 have the same bug. */
32 #if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
33- || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
34+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
35+ && !defined __clang__) \
36+ || (defined __clang__ && __clang_major__ < 8))
37 # ifdef __cplusplus
38 # if 201103 <= __cplusplus
39 # define _Alignof(type) alignof (type)
40--
412.39.0
42
diff --git a/meta/recipes-extended/cpio/cpio_2.13.bb b/meta/recipes-extended/cpio/cpio_2.13.bb
index 50d3e14c14..eb3dc138a9 100644
--- a/meta/recipes-extended/cpio/cpio_2.13.bb
+++ b/meta/recipes-extended/cpio/cpio_2.13.bb
@@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
11 file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \ 11 file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \
12 file://0001-obstack-Fix-a-clang-warning.patch \ 12 file://0001-obstack-Fix-a-clang-warning.patch \
13 file://CVE-2021-38185.patch \ 13 file://CVE-2021-38185.patch \
14 file://0001-Use-__alignof__-with-clang.patch \
14 " 15 "
15 16
16SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" 17SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"