Bug 1082957 - perl does not build with GCC 4.9
Summary: perl does not build with GCC 4.9
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://rt.perl.org/Public/Bug/Displa...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-01 07:53 UTC by Petr Pisar
Modified: 2014-04-11 06:33 UTC (History)
9 users (show)

Fixed In Version: perl-5.18.2-298.fc21
Clone Of:
Environment:
Last Closed: 2014-04-11 06:33:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Upstream patches ported to 5.18.2 (1.76 KB, patch)
2014-04-10 15:12 UTC, Petr Pisar
no flags Details | Diff

Description Petr Pisar 2014-04-01 07:53:31 UTC
As reported to upstream <https://rt.perl.org/Public/Bug/Display.html?id=121505>, perl 5.18.2 exhibits undefined behavior with GCC 4.9 and some tests fail.

There is an naive patch which is discussed more in <http://www.nntp.perl.org/group/perl.perl5.porters/2014/03/msg214109.html>.

Comment 1 Petr Pisar 2014-04-09 10:50:57 UTC
This has been worked around by adding -fwrapv to ccflags with these two commits:

commit 869747506fd0081f6c7eed149ec6f7adbcc4d5b1
Author: H.Merijn Brand <h.m.brand>
Date:   Wed Apr 9 11:16:55 2014 +0200

    gcc 4.9 by default does some optimizations that break perl (#121505)
    
    Patch by Tony Cook

commit 00051dd553979bd2a1dee100c324b59ee76a49e7
Author: H.Merijn Brand <h.m.brand>
Date:   Wed Apr 9 12:31:23 2014 +0200

    -fwrapv is broken prior to gcc-4.3 (googled and patched by Zefram)

The real code fix is demanded for perl-5.22.

Comment 2 Petr Pisar 2014-04-10 13:59:54 UTC
These two tests fail (sometimes) without the patches:

t/op/numconvert.t
t/op/range.t

Comment 3 Petr Pisar 2014-04-10 15:12:47 UTC
Created attachment 884999 [details]
Upstream patches ported to 5.18.2

Comment 4 Petr Pisar 2014-04-11 06:33:18 UTC
This patch will have to be revised after upstream develops real fix. Current patch has an impact on performance.


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