diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-01-16 23:09:51 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-21 12:27:12 +0000 |
| commit | 13aa558ba0b8842ff9e476cac1f5f4ef5ab37e8d (patch) | |
| tree | 4dfa4f9ea9abd3dd04205e3e8a9653a4102ec76f | |
| parent | 7fb77bfae18fd997cec6bca7fa5c6f5ddc52c09f (diff) | |
| download | poky-13aa558ba0b8842ff9e476cac1f5f4ef5ab37e8d.tar.gz | |
coreutils: Fix build with clang
Add a gnulib patch to fix build with clang-18
(From OE-Core rev: 8f661c567f773c22a03ec0991d700ee900c1f8d7)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch | 38 | ||||
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils_9.4.bb | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch b/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch new file mode 100644 index 0000000000..e6c84be3c4 --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From 67c298c36f69b6906840b7584be06b7b5f33f829 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
| 3 | Date: Tue, 16 Jan 2024 17:21:08 -0800 | ||
| 4 | Subject: [PATCH] posixtm: pacify clang 18 | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Problem reported by Khem Raj in: | ||
| 10 | https://lists.gnu.org/r/bug-gnulib/2024-01/msg00045.html | ||
| 11 | * lib/posixtm.c (posixtime): Pacify clang 18 by converting bool to int. | ||
| 12 | Arguably this is a bug in draft C2x, since the non-pointer args to | ||
| 13 | ckd_add should promote just like any other expressions do; | ||
| 14 | but that’s not clang’s fault. | ||
| 15 | |||
| 16 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00046.html] | ||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | --- | ||
| 19 | ChangeLog | 10 ++++++++++ | ||
| 20 | lib/posixtm.c | 2 +- | ||
| 21 | 2 files changed, 11 insertions(+), 1 deletion(-) | ||
| 22 | |||
| 23 | diff --git a/lib/posixtm.c b/lib/posixtm.c | ||
| 24 | index ef9f55f873..a072c7cad0 100644 | ||
| 25 | --- a/lib/posixtm.c | ||
| 26 | +++ b/lib/posixtm.c | ||
| 27 | @@ -191,7 +191,7 @@ posixtime (time_t *p, const char *s, unsigned int syntax_bits) | ||
| 28 | | (tm0.tm_min ^ tm1.tm_min) | ||
| 29 | | (tm0.tm_sec ^ tm1.tm_sec))) | ||
| 30 | { | ||
| 31 | - if (ckd_add (&t, t, leapsec)) | ||
| 32 | + if (ckd_add (&t, t, +leapsec)) | ||
| 33 | return false; | ||
| 34 | *p = t; | ||
| 35 | return true; | ||
| 36 | -- | ||
| 37 | 2.43.0 | ||
| 38 | |||
diff --git a/meta/recipes-core/coreutils/coreutils_9.4.bb b/meta/recipes-core/coreutils/coreutils_9.4.bb index 367b011988..a79cabd3d2 100644 --- a/meta/recipes-core/coreutils/coreutils_9.4.bb +++ b/meta/recipes-core/coreutils/coreutils_9.4.bb | |||
| @@ -16,6 +16,7 @@ inherit autotools gettext texinfo | |||
| 16 | SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ | 16 | SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ |
| 17 | file://remove-usr-local-lib-from-m4.patch \ | 17 | file://remove-usr-local-lib-from-m4.patch \ |
| 18 | file://0001-local.mk-fix-cross-compiling-problem.patch \ | 18 | file://0001-local.mk-fix-cross-compiling-problem.patch \ |
| 19 | file://0001-posixtm-pacify-clang-18.patch \ | ||
| 19 | file://run-ptest \ | 20 | file://run-ptest \ |
| 20 | " | 21 | " |
| 21 | SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52" | 22 | SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52" |
