This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [BUILDROBOT] AVR build failure (was: [Patch, tentative, AVR] Displaying per-device memory usage info)
- From: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- To: Jan-Benedict Glaw <jbglaw at lug-owl dot de>
- Cc: Denis Chertykov <chertykov at gmail dot com>, Nick Clifton <nickc at redhat dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Tue, 9 Dec 2014 11:04:28 +0530
- Subject: Re: [BUILDROBOT] AVR build failure (was: [Patch, tentative, AVR] Displaying per-device memory usage info)
- Authentication-results: sourceware.org; auth=none
- References: <20141117131755 dot GA9898 at atmel dot com> <20141124180452 dot GM19178 at embecosm dot com> <20141125060624 dot GA1044 at atmel dot com> <20141201105920 dot GA16356 at atmel dot com> <CADOs=zamgdcG_ZyiCNrzPBiHOU6Nv1gh1=FTv541ZLds-mDKcw at mail dot gmail dot com> <20141208053847 dot GA2244 at atmel dot com> <CADOs=zb_3Gb1oWYY-mUZF9S0+s8TfG60YuDQj=LNpdNiP_0gmQ at mail dot gmail dot com> <20141209023330 dot GF1007 at lug-owl dot de>
On Tue, Dec 09, 2014 at 03:33:30AM +0100, Jan-Benedict Glaw wrote:
> Hi!
>
> On Mon, 2014-12-08 21:45:01 +0400, Denis Chertykov <chertykov@gmail.com> wrote:
> > 2014-12-08 8:38 GMT+03:00 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>:
> > > On Sat, Dec 06, 2014 at 01:00:06PM +0400, Denis Chertykov wrote:
> > > > 2014-12-01 13:59 GMT+03:00 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>:
> > > > > binutils/ChangeLog
> > > > >
> > > > > 2014-11-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
> > > > >
> > > > > * configure.ac: Add od-elf32_avr to build.
> > > > > * configure: Regenerate.
> > > > > * od-elf32_avr.c: New file.
> > > > > * objdump.h: Declare objdump_private_desc_elf32_avr.
> > > > Please post the patch.
> > > Here it is.
> > Committed.
>
> The build robot found this
> (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=382446):
>
> gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils_gdb/binutils -I. -I/home/jbglaw/repos/binutils_gdb/binutils -I../bfd -I/home/jbglaw/repos/binutils_gdb/binutils/../bfd -I/home/jbglaw/repos/binutils_gdb/binutils/../include -DLOCALEDIR="\"/home/jbglaw/build/avr/_install_/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT od-elf32_avr.o -MD -MP -MF .deps/od-elf32_avr.Tpo -c -o od-elf32_avr.o /home/jbglaw/repos/binutils_gdb/binutils/od-elf32_avr.c
> cc1: warnings being treated as errors
> /home/jbglaw/repos/binutils_gdb/binutils/od-elf32_avr.c: In function âelf32_avr_dump_mem_usageâ:
> /home/jbglaw/repos/binutils_gdb/binutils/od-elf32_avr.c:184: error: missing initializer
> /home/jbglaw/repos/binutils_gdb/binutils/od-elf32_avr.c:184: error: (near initialization for âdevice.flash_sizeâ)
> make[3]: *** [od-elf32_avr.o] Error 1
> make[3]: Leaving directory `/home/jbglaw/build/avr/build-binutils-full/binutils'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/jbglaw/build/avr/build-binutils-full/binutils'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/jbglaw/build/avr/build-binutils-full/binutils'
> make: *** [all-binutils] Error 2
Was wondering for a while how I didn't see it. Turns out this is a bug in gcc
that's been fixed in newer versions (I'm running 4.9.2).
The below patch fixes the warning by explicitly initializing all members
of the struct.
If ok, could someone commit please? I don't have commit
access.
Regards
Senthil
diff --git binutils/od-elf32_avr.c binutils/od-elf32_avr.c
index 7a0a212..ced30c4 100644
--- binutils/od-elf32_avr.c
+++ binutils/od-elf32_avr.c
@@ -181,7 +181,7 @@ elf32_avr_dump_mem_usage (bfd *abfd)
char *description = NULL;
bfd_size_type note_section_size = 0;
- deviceinfo device = {0};
+ deviceinfo device = { 0, 0, 0, 0, 0, 0, NULL };
device.name = "Unknown";
bfd_size_type data_usage = 0;
- References:
- Re: [Patch, tentative, AVR] Displaying per-device memory usage info
- From: Senthil Kumar Selvaraj
- Re: [Patch, tentative, AVR] Displaying per-device memory usage info
- Re: [Patch, tentative, AVR] Displaying per-device memory usage info
- From: Senthil Kumar Selvaraj
- Re: [Patch, tentative, AVR] Displaying per-device memory usage info
- [BUILDROBOT] AVR build failure (was: [Patch, tentative, AVR] Displaying per-device memory usage info)