Skip to content

Commit

Permalink
perl-5.12.1: Use gcc-4.5.1
Browse files Browse the repository at this point in the history
Compiling perl-5.12.1 with gcc-7.5.0 and -O2 fails for some tests:

    +op/range.t ........................................................ # Failed at op/range.t line 289
    +op/numconvert.t ................................................... Failed 12/1440 subtests

Theses test don't fail, however, with -O0. So it is assumed that the
perl code contains undefined behaviour which a more recent compiler uses
for optimizations.

The tests also succeed when perl is compiled with gcc 4.5.1 which was
used to create the perl installation in /usr/local.

We want best performance and maximal compatibility with the perl version
from /usr/local. Use the old gcc compiler.

We use the old gcc compiler only for perl itself, not for cpan modules.
Some of these required c++. Also the cpan modules are kept up to date
and bugs which surfaced by changes in the compiler are fixed.
donald committed Apr 26, 2020
1 parent 426acd4 commit f3cb174
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions perl-5.12.1-0.build.sh
Original file line number Diff line number Diff line change
@@ -78,6 +78,8 @@ cd perl-$VERSION
# ... Simple work-around is to call the preprocessor with -P option
sed -i -e '/"$cppstdin $Config/ s/cppstdin/cppstdin -P/' ext/Errno/Errno_pm.PL

( . /pkg/gcc-4.5.1-0/profile

# -d : use defaults for all answers.
# -e : go on without questioning past the production of config.sh.
# -s : silent mode, only echoes questions and essential information.
@@ -95,6 +97,7 @@ make -j$(nproc)
#
make test
make install
)

cd $PREFIX;

0 comments on commit f3cb174

Please sign in to comment.