Summary: | dev-lang/perl fails to build with musl and gcc-6 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Felix Janda <felix.janda> |
Component: | Current packages | Assignee: | Gentoo musl team <musl> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 430702, 582084 | ||
Attachments: |
build.log
Patch for perl-5.22 |
Description
Felix Janda
2016-06-12 13:46:29 UTC
Created attachment 437256 [details, diff]
Patch for perl-5.22
After some debugging it seems that the code violates the strict aliasing
rules (gv and *svp are of different types but point to the same memory.)
so that gcc is allowed to do some optimization leading to the reference
counter being just decremented instead of incremented and subsequently
decremented. This hacky patch makes perl compile for me.
The relevant code is still identical in perl git. I wonder why noone
else seems to have hit this.
With perl-2.24.0-r1 the patch no longer seems necessary. Actually I cannot reproduce this bug at all with in tree gcc-6.2.0. perl is supposed to build with -fno-strict-aliasing when non-acient gcc is detected. For some reason, the compiler I've used before was not correctly detected by perl's Configure script. |