diff options
Diffstat (limited to 'poky/meta/recipes-extended/cpio')
3 files changed, 71 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch new file mode 100644 index 0000000000..d637e70395 --- /dev/null +++ b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch @@ -0,0 +1,42 @@ +From 6e169bb5fadb73b4dd300b28e9cae1e1772855e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Jan 2023 02:05:23 -0800 +Subject: [PATCH] Use __alignof__ with clang. + +For clang versions < 8, use the same +workaround as for GCC versions < 4.9. + +Backport couple of gnulib patches squashed + +[1] https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=57caf9541d98314102a55dd1cd0b8dc2be747471 +[2] https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=2af490a4c4ce85567296e27be6a9528964ca851e + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=57caf9541d98314102a55dd1cd0b8dc2be747471] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + gnu/stdalign.in.h | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/gnu/stdalign.in.h b/gnu/stdalign.in.h +index 5f56eee..e6e6a65 100644 +--- a/gnu/stdalign.in.h ++++ b/gnu/stdalign.in.h +@@ -53,9 +53,12 @@ + #undef _Alignof + + /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 +- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ ++ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. ++ clang versions < 8.0.0 have the same bug. */ + #if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ +- || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9))) ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) + # ifdef __cplusplus + # if 201103 <= __cplusplus + # define _Alignof(type) alignof (type) +-- +2.39.0 + diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch new file mode 100644 index 0000000000..6f6e396ef3 --- /dev/null +++ b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch @@ -0,0 +1,27 @@ +From 02f1f63d3ff58f3473f1689a0322a234ce10b659 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 13 Jan 2023 22:13:45 -0800 +Subject: [PATCH] obstack: Fix a clang warning + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0cc39712803ade7b2d4b89c36b143dad72404063] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + gnu/obstack.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gnu/obstack.c b/gnu/obstack.c +index 54b675d..4d6a1d5 100644 +--- a/gnu/obstack.c ++++ b/gnu/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include <libio/iolibio.h> + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +-- +2.39.0 + diff --git a/poky/meta/recipes-extended/cpio/cpio_2.13.bb b/poky/meta/recipes-extended/cpio/cpio_2.13.bb index e72a114de9..eb3dc138a9 100644 --- a/poky/meta/recipes-extended/cpio/cpio_2.13.bb +++ b/poky/meta/recipes-extended/cpio/cpio_2.13.bb @@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \ + file://0001-obstack-Fix-a-clang-warning.patch \ file://CVE-2021-38185.patch \ + file://0001-Use-__alignof__-with-clang.patch \ " SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" |