Bug 11025 - gold failed to build on 32bit hosts
Summary: gold failed to build on 32bit hosts
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-27 03:03 UTC by H.J. Lu
Modified: 2009-11-27 16:17 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
proposed patch (295 bytes, patch)
2009-11-27 14:26 UTC, Rafael Avila de Espindola
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2009-11-27 03:03:04 UTC
On Linux/ia32, I got

cc1plus: warnings being treated as errors
/net/gnu-6/export/linux/src/binutils/binutils/gold/incremental-dump.cc: In
function ‘int main(int, char**)’:
/net/gnu-6/export/linux/src/binutils/binutils/gold/incremental-dump.cc:151:
warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘long
long unsigned int’
make[6]: *** [incremental-dump.o] Error 1
Comment 1 Rafael Avila de Espindola 2009-11-27 14:26:33 UTC
Created attachment 4416 [details]
proposed patch

The patch assumes long long is 64 bits, but I think the assumption exists in
other places in gold.
Comment 2 Sourceware Commits 2009-11-27 16:15:50 UTC
Subject: Bug 11025

CVSROOT:	/cvs/src
Module name:	src
Changes by:	espindola@sourceware.org	2009-11-27 16:15:26

Modified files:
	gold           : ChangeLog incremental-dump.cc 

Log message:
	2009-11-27  Rafael Avila de Espindola  <espindola@google.com>
	
	PR gold/11025
	* incremental-dump.cc (main): Use llu to print 64 bit values.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.363&r2=1.364
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/incremental-dump.cc.diff?cvsroot=src&r1=1.1&r2=1.2

Comment 3 Rafael Avila de Espindola 2009-11-27 16:17:50 UTC
fixed