glibc recently deprecated mallinfo and introduced mallinfo2 instead: https://sourceware.org/git/?p=glibc.git;a=commit;h=e3960d1c57e57f33e0e846d615788f4ede73b945 https://sourceware.org/git/?p=glibc.git;a=commit;h=30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f Building binutils with latest glibc causes issues while compiling gold: /home/tcbot/bot-slave/at/src/at14.0-0.redhat-8_ppc64le_ppc64le/sources/binutils/gold/main.cc: In function ‘int main(int, char**)’: /home/tcbot/bot-slave/at/src/at14.0-0.redhat-8_ppc64le_ppc64le/sources/binutils/gold/main.cc:294:36: error: ‘mallinfo mallinfo()’ is deprecated [-Werror=deprecated-declarations] 294 | struct mallinfo m = mallinfo(); | ^ In file included from /home/tcbot/bot-slave/at/src/at14.0-0.redhat-8_ppc64le_ppc64le/sources/binutils/gold/main.cc:29: /home/tcbot/bot-slave/at_opt/at14.0/include/malloc.h:118:24: note: declared here 118 | extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED; | ^~~~~~~~
The master branch has been updated by Cary Coutant <ccoutant@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4ee60495054b362530a7471d363e00143ecb5cbe commit 4ee60495054b362530a7471d363e00143ecb5cbe Author: Duncan Simpson <dr.duncan.p.simpson@gmail.com> Date: Fri Mar 19 14:22:08 2021 -0700 Fix gold to use mallinfo2 if available instead of deprecated mallinfo. gold/ PR gold/26585 * configure.ac: Add check for mallinfo2. * configure: Regenerate. * main.cc (main): Use mallinfo2 if available.
Fixed on trunk.
you forgot to regenerate gold/config.in
The master branch has been updated by Cary Coutant <ccoutant@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9331846e44b34c985017264ee58a31b8bf2d5742 commit 9331846e44b34c985017264ee58a31b8bf2d5742 Author: Cary Coutant <ccoutant@gmail.com> Date: Fri Mar 19 15:23:49 2021 -0700 Regenerate config.in, missing from previous commit. PR gold/26585 * config.in: Regenerate from previous commit.
The master branch has been updated by Cary Coutant <ccoutant@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cc1849716f5c217a38ee416b48da1914a8ab66cb commit cc1849716f5c217a38ee416b48da1914a8ab66cb Author: Cary Coutant <ccoutant@gmail.com> Date: Fri Mar 19 15:29:49 2021 -0700 Fix typo in previous patch: should use struct mallinfo2. PR gold/26585 * main.cc (main): Fix typo in previous patch.
The binutils-2_36-branch branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=212b5b74a073db00569c635cb3d78a4a966a3c84 commit 212b5b74a073db00569c635cb3d78a4a966a3c84 Author: Duncan Simpson <dr.duncan.p.simpson@gmail.com> Date: Fri Mar 19 14:22:08 2021 -0700 Fix gold to use mallinfo2 if available instead of deprecated mallinfo. gold/ PR gold/26585 * configure.ac: Add check for mallinfo2. * configure: Regenerate. * main.cc (main): Use mallinfo2 if available. PR gold/26585 * main.cc (main): Fix typo in previous patch. PR gold/26585 * config.in: Regenerate from previous commit. (cherry picked from commit 4ee60495054b362530a7471d363e00143ecb5cbe) (cherry picked from commit cc1849716f5c217a38ee416b48da1914a8ab66cb) (cherry picked from commit 9331846e44b34c985017264ee58a31b8bf2d5742)