Bug in configure script for PPC64 machines

Myria myriachan at cox.net
Mon Feb 19 19:31:55 CET 2007


The bug is in GMP's configure: it's trying to use 64-bit PowerPC assembly 
code even though it detects GCC as outputting 32-bit code.  It should be 
using 32-bit assembly code, which is why --host=powerpc-unknown-linux-gnu 
works around the problem.  Outputting 32-bit code by default is correct on 
these systems, as all the other binaries are 32-bit.

On a system that had this problem, I was able to build both in 32-bit mode 
and 64-bit mod by supplying configure with the appropriate command-line 
options.  Fuzzy's compiler doesn't appear to support 64-bit, but the 
workaround for 32-bit works.

----- Original Message ----- 
From: "Torbjorn Granlund" 
<tg-this-will-bounce-but-I-am-subscribed-to-the-list-honest at swox.com>
Cc: <gmp-bugs at swox.com>
Sent: Monday, February 19, 2007 08:10
Subject: Re: Bug in configure script for PPC64 machines


If you too get spurious FAILs, then I think I might have figured out a
possible explanation.

Back in 2005, I isolated a problem with randomly clobbered registers
under the Linux kernel when running binaries for the 32-bit but using
the full powerpc64 instruction set.

I don't run GNU/Linux on any ppc64 machines I have control over, so I
cannot determine which kernels have this bug, even if I had the time
and enjoyed building Linux kernels.

I know the bug is in (Debian's version of) 2.6.11.

You can check if this is indeed the problem you're running into by
going into test/devel and then do,

  make try
  ./try mpn_mul_1

If that fails randomly, i.e. after a varying number of iterations,
you've almost certainly run into the kernel bug.

I reported this back in June 2005.

Some people might think configure should disable ppc64 instructions
when it detects a Linux kernel.  I suppose that would be a good thing,
at least if one can tell which kernels have the bug and which ones
don't.

Disabling important features in GMP to work around bugs in kernels and
compilers is in general a bad idea, unless it is disabled just for
problem kernels and compilers.  If we do it too broadly, we'll end up
with an empty envelope before long.

-- 
Torbjörn
_______________________________________________
gmp-bugs mailing list
gmp-bugs at swox.com
https://gmplib.org/mailman/listinfo/gmp-bugs



More information about the gmp-bugs mailing list