]> code.ossystems Code Review - openembedded-core.git/commitdiff
elfutils: update patch submitted upstream
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 15 Dec 2021 22:40:12 +0000 (23:40 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Dec 2021 09:56:04 +0000 (09:56 +0000)
As that's what upstream prefers.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/elfutils/elfutils_0.186.bb
meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch [deleted file]
meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch [new file with mode: 0644]
meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch

index b3588a2196d67c1f3a4b2fac0634601361bc2e9c..93f53c1f2e403233927213e9328970d123e2ade1 100644 (file)
@@ -21,8 +21,8 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
            file://run-ptest \
            file://ptest.patch \
            file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
-           file://0001-debuginfod-debuginfod-client.c-correct-string-format.patch \
            file://0001-debuginfod-fix-compilation-on-platforms-without-erro.patch \
+           file://0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch \
            "
 SRC_URI:append:libc-musl = " \
            file://0003-musl-utils.patch \
diff --git a/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch b/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch
deleted file mode 100644 (file)
index 85f22cb..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From 38ddd0d1863f83e8ec545d0160bdf00bbb5569ba Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 19 Apr 2021 23:29:10 +0200
-Subject: [PATCH] debuginfod/debuginfod-client.c: correct string format on
- 32bit arches with 64bit time_t
-
-Use intmax_t to print time_t
-
-time_t is platform dependent and some of architectures e.g.
-x32, riscv32, arc use 64bit time_t even while they are 32bit
-architectures, therefore directly using integer printf formats will not
-work portably, use intmax_t to typecast time_t into printf family of
-functions
-
-Upstream-Status: Submitted [via email to mark@klomp.org,elfutils-devel@sourceware.org]
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- debuginfod/debuginfod-client.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
-index c875ee6..df9737d 100644
---- a/debuginfod/debuginfod-client.c
-+++ b/debuginfod/debuginfod-client.c
-@@ -231,15 +231,15 @@ debuginfod_config_cache(char *config_path,
-       if (fd < 0)
-         return -errno;
--      if (dprintf(fd, "%ld", cache_config_default_s) < 0)
-+      if (dprintf(fd, "%jd", (intmax_t)cache_config_default_s) < 0)
-         return -errno;
-     }
--  long cache_config;
-+  int cache_config;
-   FILE *config_file = fopen(config_path, "r");
-   if (config_file)
-     {
--      if (fscanf(config_file, "%ld", &cache_config) != 1)
-+      if (fscanf(config_file, "%d", &cache_config) != 1)
-         cache_config = cache_config_default_s;
-       fclose(config_file);
-     }
-@@ -272,7 +272,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
-   if (fd < 0)
-     return -errno;
--  if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
-+  if (dprintf(fd, "%jd", (intmax_t)cache_clean_default_interval_s) < 0)
-     return -errno;
-   /* init max age config file.  */
-@@ -280,7 +280,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
-       && (fd = open(maxage_path, O_CREAT | O_RDWR, DEFFILEMODE)) < 0)
-     return -errno;
--  if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
-+  if (dprintf(fd, "%jd", (intmax_t)cache_default_max_unused_age_s) < 0)
-     return -errno;
-   return 0;
diff --git a/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch b/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch
new file mode 100644 (file)
index 0000000..089f1a2
--- /dev/null
@@ -0,0 +1,45 @@
+From a0852044907110479d0fb212dda2c5e45af2d3aa Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Thu, 9 Dec 2021 10:43:06 +0100
+Subject: [PATCH] debuginfod/debuginfod-client.c: use long for cache time
+ configurations
+
+time_t is platform dependent and some of architectures e.g.
+x32, riscv32, arc use 64bit time_t even while they are 32bit
+architectures, therefore directly using integer printf formats will not
+work portably.
+
+Use a plain long everywhere as the intervals are small enough
+that it will not be problematic.
+
+Upstream-Status: Submitted [via email to mark@klomp.org,elfutils-devel@sourceware.org]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ debuginfod/debuginfod-client.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
+index c875ee6..11e0fd5 100644
+--- a/debuginfod/debuginfod-client.c
++++ b/debuginfod/debuginfod-client.c
+@@ -134,17 +134,17 @@ struct debuginfod_client
+    how frequently the cache should be cleaned. The file's st_mtime represents
+    the time of last cleaning.  */
+ static const char *cache_clean_interval_filename = "cache_clean_interval_s";
+-static const time_t cache_clean_default_interval_s = 86400; /* 1 day */
++static const long cache_clean_default_interval_s = 86400; /* 1 day */
+ /* The cache_miss_default_s within the debuginfod cache specifies how
+    frequently the 000-permision file should be released.*/
+-static const time_t cache_miss_default_s = 600; /* 10 min */
++static const long cache_miss_default_s = 600; /* 10 min */
+ static const char *cache_miss_filename = "cache_miss_s";
+ /* The cache_max_unused_age_s file within the debuginfod cache specifies the
+    the maximum time since last access that a file will remain in the cache.  */
+ static const char *cache_max_unused_age_filename = "max_unused_age_s";
+-static const time_t cache_default_max_unused_age_s = 604800; /* 1 week */
++static const long cache_default_max_unused_age_s = 604800; /* 1 week */
+ /* Location of the cache of files downloaded from debuginfods.
+    The default parent directory is $HOME, or '/' if $HOME doesn't exist.  */
index 85f8140330f976331c5faf0d21c4c1059e876127..cbc9fce790858b025d256b3e7800b750ec2e7827 100644 (file)
@@ -1,4 +1,4 @@
-From 934d21dc0b06b95c7c65cb29c5096decd91d4d5f Mon Sep 17 00:00:00 2001
+From 8b48c580bae0b0ffc773b0b829c50d33a907853c Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Fri, 23 Aug 2019 10:19:48 +0800
 Subject: [PATCH] musl-utils
index c96cfd97773fc1e866d71737015010d343d6e663..995207093940ab07601f423cdd3ee2238283e0ce 100644 (file)
@@ -1,4 +1,4 @@
-From a2ce41e91d530459eb35d64a19f714ebfe0d4a20 Mon Sep 17 00:00:00 2001
+From 5e39da062929a60a07ddfc8b6d435ea65ea3e31f Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 22 Jun 2020 21:35:16 +0000
 Subject: [PATCH] config/eu.am: do not use -Werror