gmp on PowerPC

Tony Reix Tony.Reix at
Wed Sep 22 16:29:03 CEST 2004


Page , you say:

{ In order to make GMP work well on more machines, the GMP authors
{ would like guest accounts on more machines types. We currently
{ lack access to the following machines/operating systems: 
{              POWER4 running any OS 
{              Any 64-bit PowerPC running Linux 
{              Any 64-bit PowerPC running BSD

I may help you by running and experimenting gmp by myself and exchange
information, but I can't give you access to my machines.

I have downloaded gmp 4.1.3 and I tried to compile it on a PowerPC
machine for measuring the performances with a Power4 1.454 GHz machine,
in order to complete table: .
(I must compile on machine A (PowerPC,RS64-II) and then execute the
 bench on machine B (PowerPC,POWER4))

I've tried with gcc and xlc ... and failed:

 - With xlc ./configure fails :
 	checking what prefix to use for a local label...
 	configure: WARNING: cannot determine local label, using default L
	checking how to define a 32-bit word...
	configure: error: cannot determine how to define a 32-bit word

 - With gcc linking the bench fails during linkage.

- I have the following message during configure:
  configure: WARNING: gmp.h doesnt recognise compiler "__inline__", inlines will b e unavailable

- I want to use the following options:
  configure --enable-static=yes --enable-shared=no CC=cc CFLAGS = -O5 -q32 -qarch=pwr4 -qtune=pwr4 -qmaxmem=20000

- I got the following problem:
  cc -c  -O5 -q32 -qarch=pwr4 -qtune=pwr4 -qmaxmem=20000 conftes2.s                >
  line 1: 1252-162 Invalid -m flag assembly mode operand: PWR4.
        Valid values are:COM PWR PWR2 PPC 601 603 604 PPC64 620 A35 PWR5 ANY

  And I fixed it by removing the $CFLAGS in:
  gmp_compile="$CC $CPPFLAGS -c conftes1.c >&5 && $CCAS conftes2.s >&5 && $CC conftes1.$OBJEXT conftes2.$OBJEXT >&5"

I think the way PowerPC64 is handled is not appropriate.
I mean: by default, configure chooses: powerpc64-ibm-aix5.2.0.0  and thus
ar and nm use -X64 option.
I had to say: 
	configure --host=powerpc-ibm-aix5.2.0.0 --build=powerpc-ibm-aix5.2.0.0 ...
in order not to see ar and nm using -X64 option.

Though I'm using a 64bit PowerPC, I'm running AIX in 32bits mode and I
want to build a 32bits version of gmp because I think it will be faster
than a 64bit version and because I can't reboot AIX in 64bits mode (and
I can't run 64bits applications on a AIX 32bit).

So the configure shell should be able to know that it is a 64 bit HW
machine but we want to build either 32bits or 64bits libs/a.out .

How could we proceed so that I can provide some help improving gmp for
compiling on AIX/PPC ?


Tony Reix

                            Carpe Diem

More information about the gmp-devel mailing list