make check problem on Linux x86_64 with clang 3.0 and -m32

Marc Glisse marc.glisse at inria.fr
Fri Jan 27 16:30:57 CET 2012


On Fri, 27 Jan 2012, Max Neunhoeffer wrote:

> On Linux x86_64 (Ubuntu 11.04, 64bit) using the clang compiler in
> version 3.0 (downloaded from
>  http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-linux-Ubuntu-11_04.tar.bz2
> ) I did the following:
>
>  Untar gmp
>  export CC=clang
>  export CFLAGS="-m32"
>  ./configure ABI=32
>  make
>  make check
>
> and the output ended like in the attached file.
[segfault in mpz tests popcount and hamdist]

Note that --disable-shared, or running the test by loading a gcc-compiled 
libgmp.so works. Replacing clang by gcc in the invocation that turns 
tmp-popcount.asm (from x86/p6/sse2) to .libs/popcount.o also fixes the 
problem. I see 2 differences in objdump -d:
LIMB32(`mov     $cnsts, breg    ')
becomes:
-  18:	8b 9b 00 00 00 00    	mov    0x0(%ebx),%ebx
+  18:	8b 9b 30 00 00 00    	mov    0x30(%ebx),%ebx
and
         ALIGN(16)
becomes:
-  5b:	90                   	nop
-  5c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
+  5b:	0f 1f 44 00 00       	nopl   0x0(%eax,%eax,1)

(- is gcc, + is clang)

-- 
Marc Glisse


More information about the gmp-bugs mailing list