From: Franz Sirl Date: Wed, 24 Jan 2018 13:39:11 +0000 (+0000) Subject: Fix printing the size of GOLD's memory areana on Cygwin based systems. X-Git-Tag: binutils-2_30~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=086e5467691535deed5b8d783f062dfa1d36dc32;p=thirdparty%2Fbinutils-gdb.git Fix printing the size of GOLD's memory areana on Cygwin based systems. I just stumbled over this with 2.29.1 while building a cross-toolchain, on Cygwin64, but it's still the same for 2.30. m.arena has size_t on Cygwin64 and thus errors out due to -Werror=format. gold * main.cc: Print m.arena as long long. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 376c313329d..e60a1c38dd9 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2018-01-24 Franz Sirl + + * main.cc: Print m.arena as long long. + 2018-01-18 Alan Modra * powerpc.cc (param_plt_align): New function supplying default diff --git a/gold/main.cc b/gold/main.cc index aa6c698f912..06d810f5e91 100644 --- a/gold/main.cc +++ b/gold/main.cc @@ -292,8 +292,8 @@ main(int argc, char** argv) #ifdef HAVE_MALLINFO struct mallinfo m = mallinfo(); - fprintf(stderr, _("%s: total space allocated by malloc: %d bytes\n"), - program_name, m.arena); + fprintf(stderr, _("%s: total space allocated by malloc: %lld bytes\n"), + program_name, static_cast(m.arena)); #endif File_read::print_stats(); Archive::print_stats();