diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-12-31 15:49:29 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-01 23:14:52 +0000 |
commit | 15a21998ef8898e11481e77535550fa7ddfd4705 (patch) | |
tree | 45e60f0decbba59b8ed7eb9f91474b68dde3d9b2 /meta/recipes-devtools/ccache/ccache/0002-Always-use-64bit-to-print-time_t.patch | |
parent | 488c554623839d17436333894f9f4b244347de9d (diff) | |
download | openembedded-core-15a21998ef8898e11481e77535550fa7ddfd4705.tar.gz |
ccache: Build fixes for clang and riscv32
Backport patch to improve AVX detection helps build with clang
Add proposed patch to fix build with 32bit architectures using 64bit
time_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/ccache/ccache/0002-Always-use-64bit-to-print-time_t.patch')
-rw-r--r-- | meta/recipes-devtools/ccache/ccache/0002-Always-use-64bit-to-print-time_t.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ccache/ccache/0002-Always-use-64bit-to-print-time_t.patch b/meta/recipes-devtools/ccache/ccache/0002-Always-use-64bit-to-print-time_t.patch new file mode 100644 index 0000000000..85ce2b762d --- /dev/null +++ b/meta/recipes-devtools/ccache/ccache/0002-Always-use-64bit-to-print-time_t.patch @@ -0,0 +1,33 @@ +From fa360ca8a457dafcae1d22df2b342d3ee291e8af Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 31 Dec 2020 14:28:39 -0800 +Subject: [PATCH 2/2] Always use 64bit to print time_t + +some 32bit architectures e.g. RISCV32 use 64bit time_t from beginning +which does not fit into long int size on LP32 systems + +Upstream-Status: Submitted [https://github.com/ccache/ccache/pull/762] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/Logging.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/Logging.cpp b/src/Logging.cpp +index 9a5d99b7..1a6e6264 100644 +--- a/src/Logging.cpp ++++ b/src/Logging.cpp +@@ -88,7 +88,10 @@ do_log(string_view message, bool bulk) + if (tm) { + strftime(timestamp, sizeof(timestamp), "%Y-%m-%dT%H:%M:%S", &*tm); + } else { +- snprintf(timestamp, sizeof(timestamp), "%lu", tv.tv_sec); ++ snprintf(timestamp, ++ sizeof(timestamp), ++ "%llu", ++ (long long unsigned int)tv.tv_sec); + } + snprintf(prefix, + sizeof(prefix), +-- +2.30.0 + |