[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Build a library for program which is cross compile for arm



On Mon 06 Jan, yan xinbo wrote:
> I want to build a program which run on arm(my paltform
> is rh7.2), and it need gmp library, so I think I
> should cross compile the gmp library.Is that right?

yeop - that's right. Or on debian you can use dpkg-cross to install
pre-compiled arm libraries and headers for the compiler to use.
e.g something like: 
  dpkg-cross --arch arm --install libgmp2-dev

I don't know if such a facility exists for Red-hat systems. You can still
download the debian precompiled arm library binaries and install them
manually to avoid the compiler-update problem.

> I'm a newbie.
> And then I ran the configure command .
> 
> [root@davis gmp-4.0]#  ./configure
> --host=arm4vb-unknown-linux --build=pentium3
> CC=armv4b-unknown-linux-gcc CFLAGS=-mbig-endian
> AS=armv4b-unknown-linux-as LD=armv4b-unknown-linux-ld
> AR=armv4b-unknown-linux-ar
> checking build system type... pentium3-pc-none
> checking host system type... arm4vb-unknown-linux-gnu
> checking for a BSD compatible install...
> /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for mawk... no
> checking for gawk... gawk
> checking whether make sets ${MAKE}... yes
> checking whether to enable maintainer-specific
> portions of Makefiles... no
> checking whether armv4b-unknown-linux-gcc is gcc...
> yes
> checking compiler armv4b-unknown-linux-gcc
> -mbig-endian ... yes
> checking whether gcc unsigned division works... no,
> gcc <= 2.95.3
> configure: error: could not find a working compiler
> 
> [root@davis gmp-4.0.yxb]# armv4b-unknown-linux-gcc -v
> Reading specs from
> /usr/local/armbe/lib/gcc-lib/armv4b-unknown-linux/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
> 
> >From the gmp.info-1, I know that gcc demand 2.95.4 or
> later,that mean, I should upgrade the
> armv4b-unknown-linux-gcc?

Yep, looks like it.

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/     play: http://www.chaos.org.uk/~wookey/



Reply to: