Skip to contentSkip to conversation

binutuils-native from master fails with GCC 4.9 on the buld host

DISCUSSION Boszormenyi Zoltan 2 participants 2 messages Apr 14, 2014 – Apr 19, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

one of my build machines has Fedora 21 Rawhide with GCC 4.9. I tried to build an FSL image and now binutils-native fails to compile:

| In file included from /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/as.h:95:0,
|                  from /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/subsegs.c:25:
| /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/subsegs.c: In function 'subseg_change':
| ../bfd/bfd.h:304:75: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
|  #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
| ^
| /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/subsegs.c:70:7: note: in expansion of macro 'bfd_set_section_userdata'
|        bfd_set_section_userdata (stdoutput, seg, seginfo);
|        ^
| /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/subsegs.c: In function 'subseg_get':
| ../bfd/bfd.h:304:75: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
|  #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
| ^
| /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/subsegs.c:172:7: note: in expansion of macro 'bfd_set_section_userdata'
|        bfd_set_section_userdata (stdoutput, secptr, seginfo);
|        ^
| gcc  -DHAVE_CONFIG_H -I. -I/home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas -I. -I/home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas -I../bfd -I/home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/config -I/home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/../include -I/home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/.. -I/home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/zozo/fsl-community-bsp-2/build-master/tmp/sysroots/x86_64-linux/usr/share/locale\"" -isystem/home/zozo/fsl-community-bsp-2/build-master/tmp/sysroots/x86_64-linux/usr/include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -isystem/home/zozo/fsl-community-bsp-2/build-master/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -c -o tc-i386.o `test -f 'config/tc-i386.c' || echo '/home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/'`config/tc-i386.c
| In file included from /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/as.h:95:0,
|                  from /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/write.c:25:
| /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/write.c: In function 'record_alignment':
| ../bfd/bfd.h:303:83: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
|  #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
| ^
| /home/zozo/fsl-community-bsp-2/build-master/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/gas/write.c:366:5: note: in expansion of macro 'bfd_set_section_alignment'
|      bfd_set_section_alignment (stdoutput, seg, align);
|      ^
| cc1: all warnings being treated as errors

This happens with the master branch of the fsl repositories. I know Fedora 21 and GCC 4.9 still has some months to be released. This is just a heads up that at least this new "-Wunused-value" was enabled for -Wall in GCC 4.9. FYI, the bugzilla report about binutils is:
https://bugzilla.redhat.com/show_bug.cgi?id=1087374

Best regards,
Zoltán Böszörményi

#1 lore raw

Hello,

Quoted 2 lines · Boszormenyi Zoltan

one of my build machines has Fedora 21 Rawhide with GCC 4.9. I tried to build an FSL image and now binutils-native fails to compile:

...

Quoted 7 lines

| cc1: all warnings being treated as errors

This happens with the master branch of the fsl repositories. I know Fedora 21 and GCC 4.9 still has some months to be released. This is just a heads up that at least this new "-Wunused-value" was enabled for -Wall in GCC 4.9. FYI, the bugzilla report about binutils is:
https://bugzilla.redhat.com/show_bug.cgi?id=1087374

Thanks for reporting this.

I have added OE-Core mailing list and Khem (who is working 4.9 support) in Cc :D

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750