Bug 1087374 - Rebuild of binutils-2.24-11.fc21.src.rpm fails with GCC 4.9.0
Rebuild of binutils-2.24-11.fc21.src.rpm fails with GCC 4.9.0
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nick Clifton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-14 05:34 EDT by Zoltan Boszormenyi
Modified: 2015-03-03 12:00 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Fix compilation error with GCC 4.9.0 (1.80 KB, patch)
2014-04-14 05:59 EDT, Zoltan Boszormenyi
no flags Details | Diff

  None (edit)
Description Zoltan Boszormenyi 2014-04-14 05:34:55 EDT
Description of problem:

One of my development machines has Fedora 21 Rawhide and building OpenEmbedded/Yocto on it failed at binutils 2.24. The problem is not with OE/Yocto, it's a bug in a macro in binutils uncovered by the recent introduction of GCC 4.9 into Rawhide. The new GCC has enabled -Wunused-value for -Wall and together with -Werror, it's turned into a compilation error. The last lines of the compiler output (from rpmbuild --rebuild binutils-2.24-11.fc21.src.rpm) is:

subsegs.c: In function 'subseg_change':
subsegs.c:70:37: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
       bfd_set_section_userdata (stdoutput, seg, seginfo);
                                     ^
subsegs.c: In function 'subseg_get':
subsegs.c:172:40: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
       bfd_set_section_userdata (stdoutput, secptr, seginfo);
                                        ^
cc1: all warnings being treated as errors
make[4]: *** [subsegs.o] Error 1
make[4]: *** Waiting for unfinished jobs....
write.c: In function 'record_alignment':
write.c:366:40: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
     bfd_set_section_alignment (stdoutput, seg, align);
                                        ^
cc1: all warnings being treated as errors
make[4]: *** [write.o] Error 1
config/obj-elf.c: In function 'obj_elf_init_stab_section':
config/obj-elf.c:1940:34: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
   bfd_set_section_alignment (stdoutput, seg, 2);
                                  ^
cc1: all warnings being treated as errors

Version-Release number of selected component (if applicable):

$ rpm -q gcc
gcc-4.9.0-0.10.fc21.x86_64

The version of binutils is at
http://koji.fedoraproject.org/koji/buildinfo?buildID=507201

How reproducible:

Obviously always.

Steps to Reproduce:
1. Install Fedora 21 Rawhide with GCC 4.9
2. Try to rebuild binutils from the koji link.
3.

Actual results:

Compiler error.

Expected results:

Package should be built properly.

Additional info:
Comment 1 Zoltan Boszormenyi 2014-04-14 05:59:15 EDT
Created attachment 886079 [details]
Fix compilation error with GCC 4.9.0

This patch fixes the compilation error.
Comment 2 Zoltan Boszormenyi 2014-04-14 06:29:56 EDT
Although the patch fixes building binutils, GCC 4.9.0 causes regressions in the binutils checks. Here are the dejagnu headers and summaries as seen in the terminal.

Test Run By zozo on Mon Apr 14 11:49:06 2014
Native configuration is x86_64-redhat-linux-gnu

		=== binutils tests ===

Schedule of variations:
    unix

Running target unix

...

		=== binutils Summary ===

# of expected passes           19
# of unexpected failures       70
# of unresolved testcases       2
# of untested testcases		6
# of unsupported tests		1

------------------------------------

Test Run By zozo on Mon Apr 14 11:49:14 2014
Native configuration is x86_64-redhat-linux-gnu

		=== gas tests ===

Schedule of variations:
    unix

Running target unix

...

		=== gas Summary ===

# of expected passes          185
# of unexpected failures      576

------------------------------------

Test Run By zozo on Mon Apr 14 11:51:36 2014
Native configuration is x86_64-redhat-linux-gnu

		=== ld tests ===

Schedule of variations:
    unix

Running target unix

...

		=== ld Summary ===

# of expected passes		25
# of unexpected failures	738
# of expected failures		43
# of unresolved testcases	59
# of untested testcases		1

------------------------------------

Test Run By zozo on Mon Apr 14 11:49:14 2014
Native configuration is x86_64-redhat-linux-gnu

		=== gas tests ===

Schedule of variations:
    unix

Running target unix

...

		=== gas Summary ===

# of expected passes		185
# of unexpected failures	576
../as-new 2.24

Test Run By zozo on Mon Apr 14 11:51:36 2014
Native configuration is x86_64-redhat-linux-gnu

		=== ld tests ===

Schedule of variations:
    unix

Running target unix

...

		=== ld Summary ===

# of expected passes		25
# of unexpected failures	738
# of expected failures		43
# of unresolved testcases	59
# of untested testcases		1
/home/zozo/rpmbuild/BUILD/binutils-2.24/ld/ld-new -znorelro 2.24

Test Run By zozo on Mon Apr 14 11:49:06 2014
Native configuration is x86_64-redhat-linux-gnu

		=== binutils tests ===

Schedule of variations:
    unix

Running target unix

...

		=== binutils Summary ===

# of expected passes		19
# of unexpected failures	70
# of unresolved testcases	2
# of untested testcases		6
# of unsupported tests		1
Comment 3 Nick Clifton 2014-04-22 07:29:24 EDT
Hi Zoltan,

  Thanks for the bug report.  I have imported that fix from the FSF mainline sources which uses inline functions rather than macros.  This is now in the binutils-2.24-12.fc21 release.

  As for the 4.9 induced regressions, I will have to spend some more time investigating them.

Cheers
  Nick
Comment 4 Jaroslav Reznik 2015-03-03 12:00:23 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Note You need to log in before you can comment on or make changes to this bug.