Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143895 - perl, libperl gets screwed by -fsched2-use-superblocks; a case for flag-o-matic?
Summary: perl, libperl gets screwed by -fsched2-use-superblocks; a case for flag-o-matic?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Highest enhancement (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 09:47 UTC by sg313
Modified: 2006-08-15 09:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Filters -fsched2-use-superblocks for perl (perl-5.8.8-r2.ebuild.patch,445 bytes, patch)
2006-08-14 09:51 UTC, sg313
Details | Diff
Filters -fsched2-use-superblocks for libperl (libperl-5.8.8-r1.ebuild.patch,462 bytes, patch)
2006-08-14 09:52 UTC, sg313
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sg313 2006-08-14 09:47:00 UTC
perl and libperl don't like the optimization flag -fsched2-use-superblocks in conjunction with -O2 or higher on gcc-4.1.1. 
This causes perl 'require vX.Y.Z' to fail for versions ending with .0 (Z=0),
for example a perl-5.8.8 installation exit with an error from 
perl -e 'require v5.6.0'; 
On gcc-3.4.6 these malfunctions couldn't be observed.

Description:
The optimization damages loop code in str_to_version. As a consequence the command >>perl -e require 'vX.Y.0'<< will fail for any values of X,Y;
This seems to be version of a (well) known bug on gcc-bugzilla. They closed
it as wontfix.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 for details.
If are convinced that this is a another bug, feel free to file it at
the gcc-bugzilla.

Steps to reproduce:
1. Compile libperl/perl >= 5.8 with gcc-4.1.1, -O2 & -fsched2-use-superblocks.
2. perl -e 'require 5.6.0' -> Will abort with error (!)

Proposed solution:
This can be easyly circumvented by using flag-o-matic to  strip -fsched2-use-superblocks from CFLAGS.
Patches for perl and libperl ebuilds are attached.
Comment 1 sg313 2006-08-14 09:51:42 UTC
Created attachment 94253 [details, diff]
Filters -fsched2-use-superblocks for perl

s.o.
Comment 2 sg313 2006-08-14 09:52:32 UTC
Created attachment 94254 [details, diff]
Filters -fsched2-use-superblocks for libperl

s.o.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-08-14 10:23:34 UTC
Quite frankly, we really have better things to do that to filter whatever ultraweird flag that someone has stuck into his flags for whatever reason. How about that you filter it yourself?

Comment 4 sg313 2006-08-14 10:41:32 UTC
The report was not meant to be an offense. Discard it if you want;
I just wanted to share the solution.
Comment 5 Christian Hartmann (RETIRED) gentoo-dev 2006-08-15 06:48:59 UTC
Fixed in cvs.
Comment 6 sg313 2006-08-15 09:23:41 UTC
Thanks!