From f3cb1748e821ce83c99cdba2838f45d2476d8bcb Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 23 Apr 2020 19:31:16 +0200 Subject: [PATCH] perl-5.12.1: Use gcc-4.5.1 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. --- perl-5.12.1-0.build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/perl-5.12.1-0.build.sh b/perl-5.12.1-0.build.sh index ddcd87a..55039a3 100755 --- a/perl-5.12.1-0.build.sh +++ b/perl-5.12.1-0.build.sh @@ -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;