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.
This commit is contained in:
Franz Sirl 2018-01-24 13:39:11 +00:00 committed by Cary Coutant
parent 12863263d6
commit 04879304de
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2018-07-11 Franz Sirl <franz.sirl-kernel@lauterbach.com>
* main.cc (main): Print m.arena as long long.
2018-07-09 Cary Coutant <ccoutant@gmail.com>
* incremental.cc (Sized_incremental_binary::setup_readers): Use

View File

@ -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<long long>(m.arena));
#endif
File_read::print_stats();
Archive::print_stats();