Building GMP for ARM AT91SAM7

Michał spock2 at o2.pl
Thu May 14 12:50:59 CEST 2009


Hello ,

OK, I followed your suggestions and modified configure command to:

./configure --build=athlon64-pc-linux-gnu --host=arm-elf CC=arm-elf-gcc

This actually produced some errors suggesting wrongly installed arm 
toolchain. The problem was caused by the fact that I did not add 
necessary directories to my PATH. After fixing the problem I have 
successfully ran configure and make. But unfortunately make check 
returns error.

Could you suggest what causes the problem?

Below I am providing make check output:

spock at spock-desktop:~/Desktop/gmp-4.3.0$ make check
make  check-recursive
make[1]: Entering directory `/home/spock/Desktop/gmp-4.3.0'
Making check in tests
make[2]: Entering directory `/home/spock/Desktop/gmp-4.3.0/tests'
Making check in .
make[3]: Entering directory `/home/spock/Desktop/gmp-4.3.0/tests'
make  libtests.la t-bswap t-constants t-count_zeros t-gmpmax 
t-hightomask t-modlinv t-popc t-parity t-sub
make[4]: Entering directory `/home/spock/Desktop/gmp-4.3.0/tests'
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o memory.lo memory.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c memory.c -o memory.o
In file included from memory.c:24:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o misc.lo misc.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c misc.c -o misc.o
In file included from misc.c:44:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o refmpf.lo refmpf.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c refmpf.c -o refmpf.o
In file included from refmpf.c:24:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o refmpn.lo refmpn.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c refmpn.c -o refmpn.o
In file included from refmpn.c:36:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o refmpq.lo refmpq.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c refmpq.c -o refmpq.o
In file included from refmpq.c:21:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o refmpz.lo refmpz.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c refmpz.c -o refmpz.o
In file included from refmpz.c:26:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o spinner.lo spinner.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c spinner.c -o spinner.o
In file included from spinner.c:31:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=compile arm-elf-gcc -DHAVE_CONFIG_H -I. -I. 
-I.. -I..    -O2 -pedantic -fomit-frame-pointer -c -o trace.lo trace.c
 arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -pedantic 
-fomit-frame-pointer -c trace.c -o trace.o
In file included from trace.c:32:
../gmp-impl.h:3233: warning: type of bit-field 'manh' is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field 'exp' is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field 'sig' is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field 'manl' is a GCC extension
/bin/bash ../libtool --mode=link arm-elf-gcc  -O2 -pedantic 
-fomit-frame-pointer   -o libtests.la   memory.lo misc.lo refmpf.lo 
refmpn.lo refmpq.lo refmpz.lo spinner.lo trace.lo  ../libgmp.la
mkdir .libs
arm-elf-ar cq .libs/libtests.a  memory.o misc.o refmpf.o refmpn.o 
refmpq.o refmpz.o spinner.o trace.o
arm-elf-ranlib .libs/libtests.a
creating libtests.la
(cd .libs && rm -f libtests.la && ln -s ../libtests.la libtests.la)
arm-elf-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..    -O2 -pedantic 
-fomit-frame-pointer -c t-bswap.c
In file included from t-bswap.c:24:
../gmp-impl.h:3233: warning: type of bit-field ‘manh’ is a GCC extension
../gmp-impl.h:3234: warning: type of bit-field ‘exp’ is a GCC extension
../gmp-impl.h:3235: warning: type of bit-field ‘sig’ is a GCC extension
../gmp-impl.h:3236: warning: type of bit-field ‘manl’ is a GCC extension
/bin/bash ../libtool --mode=link arm-elf-gcc  -O2 -pedantic 
-fomit-frame-pointer   -o t-bswap  t-bswap.o libtests.la ../libgmp.la
arm-elf-gcc -O2 -pedantic -fomit-frame-pointer -o t-bswap t-bswap.o  
./.libs/libtests.a /home/spock/Desktop/gmp-4.3.0/.libs/libgmp.a 
../.libs/libgmp.a 
/home/spock/Desktop/auto_install_gnuarm/gnu-arm-installer/install/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: 
unknown architecture of input file 
`/home/spock/Desktop/gmp-4.3.0/.libs/libgmp.a(mp_bases.o)' is 
incompatible with arm output
collect2: ld returned 1 exit status
make[4]: *** [t-bswap] Error 1
make[4]: Leaving directory `/home/spock/Desktop/gmp-4.3.0/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/home/spock/Desktop/gmp-4.3.0/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/spock/Desktop/gmp-4.3.0/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/spock/Desktop/gmp-4.3.0'
make: *** [check] Error 2

Kind Regards
Michal




Torbjorn Granlund pisze:
> Michał <spock2 at o2.pl> writes:
>
>   I am trying to build GMP library for ARM AT91SAM7 microcontroller
>   (stand alone without linux). I am working on ubuntu and I have already
>   installed GNU ARM toolchain.
>   
>   ./configure --build=athlon64-pc-linux-gnu --host=arm-elf
>   
>   Finishes without errors but when I execute make, I get following errors:
>   
>   tmp-add_n.s: Assembler messages:
>   tmp-add_n.s:58: Error: no such instruction: `stmfd r13!,{r8,r9,r14}'
>   tmp-add_n.s:59: Error: too many memory references for `movs'
>   tmp-add_n.s:60: Error: no such instruction: `bcc .Lskip1'
>   tmp-add_n.s:61: Error: no such instruction: `ldr r12,[r1],'
>   tmp-add_n.s:62: Error: no such instruction: `ldr r14,[r2],'
>   ...
>   Does anyone have any idea what can cause such kind of problem?
>   
> ARM assembly chokes an athlon64 assembly.  You need to set up a cross
> compilation environment (presumably this is what you call GNU ARM
> toolchain), and point GMP to its tools.  GMP will not always
> automatically be able to guess the ARM tools path.
>
> See also the section in the GMP manual about cross compilation.
>
>   



More information about the gmp-discuss mailing list