Compiling gmp-6.0.0 for gcc-arm-none-eabi

Steve Dierker dierker.steve at
Mon Jun 22 16:00:41 UTC 2015

Hello list,

I further investigated the problem.
As soon as I configure GMP like this:
./configure --host=arm-none-eabi --disable-assembly 
the configuration finished without an error. But after compiling it,
make check yields the following:

make  check-recursive
make[1]: Entering directory
Making check in tests
make[2]: Entering directory
Making check in .
make[3]: Entering directory
make t-bswap t-constants t-count_zeros t-gmpmax
t-hightomask t-modlinv t-popc t-parity t-sub
make[4]: Entering directory
make[4]: '' is up to date.
/bin/bash ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2
-pedantic -fomit-frame-pointer -DNO_ASM   -o t-bswap t-bswap.o ../ 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer
-DNO_ASM -o t-bswap t-bswap.o  ./.libs/libtests.a /home/steved/Documents/workspace/bachelor/cryptoino/contrib/gmp-6.0.0/.libs/libgmp.a ../.libs/libgmp.a
./.libs/libtests.a: error adding symbols: Archive has no index; run
ranlib to add one
collect2: error: ld returned 1 exit status
Makefile:477: recipe for target 't-bswap' failed
make[4]: *** [t-bswap] Error 1
make[4]: Leaving directory
Makefile:809: recipe for target 'check-am' failed
make[3]: *** [check-am] Error 2
make[3]: Leaving directory
Makefile:532: recipe for target 'check-recursive' failed
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory
Makefile:849: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory
Makefile:1169: recipe for target 'check' failed
make: *** [check] Error 2


On Mon, 22 Jun 2015 15:38:51 +0200
Steve Dierker <dierker.steve at> wrote:

> Hello list,
> I want to use gmp for a mikro controller project running on an
> STM32F4. Currently I build my project on a Debian Jessie machine with
> arm-none-eabi- v.4.8.
> I read the documentation of gmp and as far as I understood it, I have
> to cross compile the library first and then include the header and the
> static library into my project.
> So first I did:
> ./configure --host=arm-none-eabi
> But it fails with:
> checking if globals are prefixed by
> underscore... /usr/bin/arm-none-eabi-nm: conftest.o: File format not
> recognized unknown configure: WARNING:
> +----------------------------------------------------------
> configure: WARNING: | Cannot determine global symbol prefix.
> configure: WARNING: | /usr/bin/arm-none-eabi-nm -B output doesn't
> contain a global data symbol. configure: WARNING: | Will proceed with
> no underscore. configure: WARNING: | If this is wrong then you'll get
> link errors referring configure: WARNING: | to ___gmpn_add_n (note
> three underscores). configure: WARNING: | In this case do a fresh
> build with an override, configure: WARNING: |     ./configure
> gmp_cv_asm_underscore=yes configure: WARNING:
> +---------------------------------------------------------- checking
> how to switch to read-only data section...
> 	.section	.rodata checking for assembler .type
> directive... .type	$1,@$2 checking for assembler .size
> directive... .size	$1,$2 checking for assembler local label
> prefix... configure: WARNING: "/usr/bin/arm-none-eabi-nm -B" failure
> configure: WARNING: cannot determine local label, using default L L
> checking for assembler byte directive... .byte checking how to define
> a 32-bit word... /usr/bin/arm-none-eabi-nm: conftest.o: File format
> not recognized /usr/bin/arm-none-eabi-nm: conftest.o: File format not
> recognized configure: error: cannot determine how to define a 32-bit
> word
> I also attached the complete log. Can you help me to figure what I did
> wrong?
> best,
> Steve


XMPP: bigzed at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the gmp-discuss mailing list