GMP 4.2.4 fails with ABI=mode32 on powerpc970-unknown-linux-gnu

Vincent Lefevre vincent at vinc17.org
Wed Mar 11 16:26:25 CET 2009


On 2009-03-11 15:51:18 +0100, Torbjorn Granlund wrote:
> Paul Zimmermann <Paul.Zimmermann at loria.fr> writes:
> 
>   I tried compiling GMP 4.2.4 with ABI=mode32 on gcc40.fsffrance.org
>   (powerpc970-unknown-linux-gnu), but it fails, although configure did not cry:
>   
>   zimmerma at gcc40:~/gmp-4.2.4$ ./configure --disable-shared ABI=mode32
>   ...
>   zimmerma at gcc40:~/gmp-4.2.4$ make
>   ...
>    gcc -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_dive_1 -mpowerpc64 -Wa,-mppc64 -mcpu=970 -O3 -c dive_1.c -o dive_1.o
>   /tmp/ccxURvOI.s: Assembler messages:
>   /tmp/ccxURvOI.s:62: Error: junk at end of line: `1'
>   /tmp/ccxURvOI.s:93: Error: junk at end of line: `1'
>   make[2]: *** [dive_1.lo] Error 1
>   make[2]: Leaving directory `/home/zimmerma/gmp-4.2.4/mpn'
>   make[1]: *** [all-recursive] Error 1
>   make[1]: Leaving directory `/home/zimmerma/gmp-4.2.4'
>   make: *** [all] Error 2
>   
>   Note that everything is ok with ABI=32.
>   
> What a naughty compiler, generating assembly code that the assembler
> doesn't understand!  (This is not GMP related, it is easy to trigger
> with plain C code.)

I disagree about that. It is not obvious that the whole compilation
chain has to support the options you provide (-mpowerpc64 -Wa,-mppc64
-mcpu=970), in particular because that gcc does not come with its own
assembler ("as" comes with GNU Binutils, not GCC).

The (info) documentation of "as" on my machine says:

`-mppc64, -m620'
     Generate code for PowerPC 620/625/630.

but this is not the PowerPC 970 (-mcpu=970). So, it is not clear
that this is not a bug in GMP.

-- 
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list