summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/0020-Fix-typo-in-previous-patch-should-use-struct-mallinf.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2021-05-12 17:42:36 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2021-05-12 17:47:39 +0200
commitef27039138d1fc341fba58474c515dec782d8f8c (patch)
treeaa32431ff84e7edaf74e079eec99a7ca79ac1dfc /meta/recipes-devtools/binutils/binutils/0020-Fix-typo-in-previous-patch-should-use-struct-mallinf.patch
parentc691bc52560e66d7fd08a548789f8e409c1a14d1 (diff)
downloadopenembedded-core-contrib-jansa/binutils.tar.gz
binutils: backport gold changes to use mallinfo2 instead of deprecated mallinfojansa/binutils
* mallinfo got deprecacted in glibc-2.33 with: https://sourceware.org/git/?p=glibc.git;a=commit;h=e3960d1c57e57f33e0e846d615788f4ede73b945 https://sourceware.org/git/?p=glibc.git;a=commit;h=30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f * resolves this warning: oe-core$ grep mallinfo tmp-glibc/work/x86_64-linux/binutils-cross-x86_64/2.36.1-r0/temp/log.do_compile checking whether sbrk is declared... checking for mallinfo... yes ../../gold/main.cc:294:36: warning: ‘mallinfo mallinfo()’ is deprecated [-Wdeprecated-declarations] * after: oe-core$ grep mallinfo tmp-glibc/work/x86_64-linux/binutils-cross-x86_64/2.36.1-r0/temp/log.do_compile checking for struct stat.st_mtim.tv_nsec in sys/stat.h... checking for mallinfo... yes checking whether snprintf is declared... checking for mallinfo2... configure: updating cache ./config.cache the configure output is badly mixed together, but mallinfo2 support was detected OK: oe-core$ grep _mallinfo tmp-glibc/work/x86_64-linux/binutils-cross-x86_64/2.36.1-r0/git/build.x86_64-linux.x86_64-oe-linux/gold/config.log ac_cv_func_mallinfo2=yes ac_cv_func_mallinfo=yes Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0020-Fix-typo-in-previous-patch-should-use-struct-mallinf.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/0020-Fix-typo-in-previous-patch-should-use-struct-mallinf.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0020-Fix-typo-in-previous-patch-should-use-struct-mallinf.patch b/meta/recipes-devtools/binutils/binutils/0020-Fix-typo-in-previous-patch-should-use-struct-mallinf.patch
new file mode 100644
index 0000000000..fe59ba72c2
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0020-Fix-typo-in-previous-patch-should-use-struct-mallinf.patch
@@ -0,0 +1,28 @@
+From 0b97c4b07830c0873f0d863ee8a63b294f0112e4 Mon Sep 17 00:00:00 2001
+From: Cary Coutant <ccoutant@gmail.com>
+Date: Fri, 19 Mar 2021 15:29:49 -0700
+Subject: [PATCH] Fix typo in previous patch: should use struct mallinfo2.
+
+ PR gold/26585
+ * main.cc (main): Fix typo in previous patch.
+
+Upstream-Status: Backport [cc1849716f5 Fix typo in previous patch: should use struct mallinfo2.]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ gold/main.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gold/main.cc b/gold/main.cc
+index 89bc40b22af..ff44cbb7add 100644
+--- a/gold/main.cc
++++ b/gold/main.cc
+@@ -291,7 +291,7 @@ main(int argc, char** argv)
+ elapsed.wall / 1000, (elapsed.wall % 1000) * 1000);
+
+ #if defined(HAVE_MALLINFO2)
+- struct mallinfo m = mallinfo2();
++ struct mallinfo2 m = mallinfo2();
+ fprintf(stderr, _("%s: total space allocated by malloc: %lld bytes\n"),
+ program_name, static_cast<long long>(m.arena));
+ #elif defined(HAVE_MALLINFO)