gmp 4.2 fails tests on G5

Torbjorn Granlund tege at
Thu Apr 27 12:05:04 CEST 2006

howarth at (Jack Howarth) writes:

       My initial guess at the source of the problem turned out to be
  correct. I had thought the use of -fno-common to provide PIC code
  seemed suspect. If you rebuild gmp 4.2 on a G5 with...
PIC is the default for this platform.

Libtool adds -fno-common due to bugs with common symbols
handling, presumably in the linker or the run-time linker.

  ./configure --enable-cxx CC='gcc -fPIC' CXX='g++ -fPIC'
  ...the resulting build passes make check fine. We ran into a lot of
  this in ppc-linux.

What are the problems with ppc-linux?  Have you reported them?

  Any shared libs built on ppc without -fPIC are
  subject to weird hard to debug crashes. I seriously doubt that
  -fno-common provides the same compiler behavior as -fPIC. Often
  on ppc compiles I have seen both used together.

When I compile test files with or without -fPIC, I get identical code,
just as documented in the Apple version of the gcc manual.

It is possible that your setting of compiler options to the CC
variable, not the CFLAGS variable, inhibits some behaviour that causes
the problems we're seeing.  But that's just a guess.


More information about the gmp-bugs mailing list