In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/63b7eadbbf46d98f0a1bde05821cb66b9c04c351?hp=59206727b78ef2c3c1f5b83c0a4d9a24a867c5da>
- Log ----------------------------------------------------------------- commit 63b7eadbbf46d98f0a1bde05821cb66b9c04c351 Author: Jarkko Hietaniemi <[email protected]> Date: Tue Oct 7 08:49:02 2014 +0200 Skip the test if in linux but not in x86*. The state of things found by Ãvar in ppc linux was even weirder: most -- but not all! -- text symbols were in D section, not in T. Skipping is fine since we are here after best-effort testing, failing softly is quite acceptable. M t/porting/libperl.t commit 4d3fd3a9525136c14b17e44b6d97747b4be7a96a Author: Jarkko Hietaniemi <[email protected]> Date: Tue Oct 7 08:35:04 2014 +0200 The double-double precision can be really large. I don't know where I had pulled the earlier smaller limit, but sisyphus@ set me right. M sv.c ----------------------------------------------------------------------- Summary of changes: sv.c | 11 ++++++++--- t/porting/libperl.t | 9 ++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/sv.c b/sv.c index 1952500..b2dcc91 100644 --- a/sv.c +++ b/sv.c @@ -10714,12 +10714,16 @@ Perl_sv_vcatpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, #if LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN || \ LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN # define LONGDOUBLE_DOUBLEDOUBLE -# define DOUBLEDOUBLE_MAXBITS 1028 +/* The first double can be as large as 2**1023, or '1' x '0' x 1023. + * The second double can be as small as 2**-1074, or '0' x 1073 . '1'. + * The sum of them can be '1' . '0' x 2096 . '1', with implied radix point + * after the first 1023 zero bits. */ +# define DOUBLEDOUBLE_MAXBITS 2098 #endif /* vhex will contain the values (0..15) of the hex digits ("nybbles" * of 4 bits); 1 for the implicit 1, and the mantissa bits, four bits - * per xdigit. */ + * per xdigit. For the double-double case, this can be rather many. */ #ifdef LONGDOUBLE_DOUBLEDOUBLE # define VHEX_SIZE (1+DOUBLEDOUBLE_MAXBITS/4) #else @@ -11960,7 +11964,8 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p * Since each double has their own exponent, the * doubles may float (haha) rather far from each * other, and the number of required bits is much - * larger, up to total of 1028 bits. + * larger, up to total of DOUBLEDOUBLE_MAXBITS bits. + * See the definition of DOUBLEDOUBLE_MAXBITS. * * Need 2 hexdigits for each byte. */ need += (DOUBLEDOUBLE_MAXBITS/8 + 1) * 2; diff --git a/t/porting/libperl.t b/t/porting/libperl.t index 550a97b..0e0296e 100644 --- a/t/porting/libperl.t +++ b/t/porting/libperl.t @@ -4,7 +4,7 @@ # symbols we expect, and no symbols we should avoid. # # Fail softly, expect things only on known platforms: -# - linux +# - linux, x86 only (ppc linux has odd symbol tables) # - darwin (OS X), both x86 and ppc # - freebsd # and on other platforms, and if things seem odd, just give up (skip_all). @@ -66,6 +66,7 @@ unless (defined $libperl_a) { } print "# \$^O = $^O\n"; +print "# \$Config{archname} = $Config{archname}\n"; print "# \$Config{cc} = $Config{cc}\n"; print "# libperl = $libperl_a\n"; @@ -128,6 +129,12 @@ if (defined $nm_style) { } } +if ($^O eq 'linux' && $Config{archname} !~ /^x86/) { + # For example in ppc most (but not all!) code symbols are placed + # in 'D' (data), not in ' T '. We cannot work under such conditions. + skip_all "linux but archname $Config{archname} not x86*"; +} + unless (defined $nm) { skip_all "no nm"; } -- Perl5 Master Repository
